I'm connecting directly to our Elektron Edge Device, which has two services, ELEKTRON_AD and ELEKTRON_DD. I'm running software that instantiates multiple RFA client objects (derived from rfa::common::Client), using the same Session configuration. I'm using C++ RFA7.6.2.L1, I've also tried 7.6.1.E1, and 8.0.1.L1 (all win-shared, VS2013, windows 7).
The problem is that second and subsequent clients receive incorrect directory information.
To demonstrate the problem, example program "Consumer" (directory \Examples\Consumer in C++ RFA version 7.6.2.L1.win-shared) can be modified to show the problem. Modify Application.cpp, at line 157 insert "::Sleep(15000);". This makes the second and subsequent clients start up after a delay. Note that the problem doesn't manifest without the delay between clients starting up.
When configured with multiple clients, only the first client gets the expected directory data:
ConsumerClient_10 : /Directory cache (Msg Refresh) Service: ELEKTRON_AD last action: Add INFO: ServiceId: 265 Vendor: Reuters IsSource: False Capabilities: Dictionary MarketPrice MarketByOrder MarketByPrice MarketMaker SymbolList Invalid mmt(11) Invalid mmt(13) Invalid mmt(18) Invalid mmt(19) Invalid mmt(20) Invalid mmt(21) Invalid mmt(23) Invalid mmt(24) Invalid mmt(25) Invalid mmt(26) Invalid mmt(28) Invalid mmt(126) DictionariesProvided: RWFFld RWFEnum DictionariesUsed: RWFFld RWFEnum QoS: Timeliness: RealTime Rate: TickByTick SupportsQosRange: No SupportsOutOfBandSnapshots: Yes AcceptingConsumerStatus: No STATE: ServiceState: Up (Yes) AcceptingRequests: Yes Status: dataState: Ok streamState: Open statusCode: None statusText: Up
Second and subsequent clients get "bad" directory data:
ConsumerClient_11 : /Directory cache (Msg Refresh) Service: UNKNOWN last action: Add INFO: ServiceId: 265 Vendor: IsSource: False Capabilities: DictionariesProvided: DictionariesUsed: QoS: Timeliness: RealTime Rate: TickByTick SupportsQosRange: No SupportsOutOfBandSnapshots: Yes AcceptingConsumerStatus: No STATE: ServiceState: Down (No) AcceptingRequests: No /End Directory cache (Msg Refresh)
My application configuration, which I would have attached but for whatever reason attachment upload isn't working:
\ConsumerClient_10\session = "Session1" \ConsumerClient_10\service = "ELEKTRON_AD" \ConsumerClient_10\itemList = "BHP.AX" \ConsumerClient_10\msgModelRequestType = "marketPrice" \ConsumerClient_10\msgModelDefaultDisplay = true \ConsumerClient_10\userName = "treprt" \ConsumerClient_10\appId = "256" \ConsumerClient_10\InstanceId = "<Instance Id>" \ConsumerClient_10\loadLocalDicts = false \ConsumerClient_10\fieldDictionaryFilename = "./RDMFieldDictionary" \ConsumerClient_10\enumDictionaryFilename = "./enumtype.def" \ConsumerClient_10\directoryReqFilter = "SERVICE_INFO_FILTER | SERVICE_STATE_FILTER" \ConsumerClient_10\SourceMirroringMode = "0" \ConsumerClient_10\useEventQueue = true \ConsumerClient_11\session = "Session1" \ConsumerClient_11\service = "ELEKTRON_AD" \ConsumerClient_11\itemList = "CBA.AX" \ConsumerClient_11\msgModelRequestType = "marketPrice" \ConsumerClient_11\msgModelDefaultDisplay = true \ConsumerClient_11\userName = "treprt" \ConsumerClient_11\appId = "256" \ConsumerClient_11\InstanceId = "<Instance Id>" \ConsumerClient_11\loadLocalDicts = false \ConsumerClient_11\fieldDictionaryFilename = "./RDMFieldDictionary" \ConsumerClient_11\enumDictionaryFilename = "./enumtype.def" \ConsumerClient_11\directoryReqFilter = "SERVICE_INFO_FILTER | SERVICE_STATE_FILTER" \ConsumerClient_11\SourceMirroringMode = "0" \ConsumerClient_11\useEventQueue = true \ConsumerClient_12\session = "Session1" \ConsumerClient_12\service = "ELEKTRON_AD" \ConsumerClient_12\itemList = "CBA.AX" \ConsumerClient_12\msgModelRequestType = "marketPrice" \ConsumerClient_12\msgModelDefaultDisplay = true \ConsumerClient_12\userName = "treprt" \ConsumerClient_12\appId = "256" \ConsumerClient_12\InstanceId = "<Instance Id>" \ConsumerClient_12\loadLocalDicts = false \ConsumerClient_12\fieldDictionaryFilename = "./RDMFieldDictionary" \ConsumerClient_12\enumDictionaryFilename = "./enumtype.def" \ConsumerClient_12\directoryReqFilter = "SERVICE_INFO_FILTER | SERVICE_STATE_FILTER" \ConsumerClient_12\SourceMirroringMode = "0" \ConsumerClient_12\useEventQueue = true
I haven't included my RFA.cfg file, because obviously its contents are unique to my environment.
Notice the service name is "UNKNOWN". If you inspect the contents of the directory message more closely, it seems to contain what looks like "stale" data.
Our organisation has an RHS solution as well, and the problem does not manifest there - it only occurs when directly connecting to the Elektron Edge Device.
Because of the architecture of our application and our deployment environment, all clients need to use the same login/Session.
Is the above a bug in RFA? Is there something fundamentally wrong with my use of RFA here?
Thanks in advance!
The way RFA API work is, if you use the same login credentials for multiple Session/OMMConsumer, RFA will not re-send the login and source directory request but it will use the information from RFA internal cache.
However, it seems that getting a group status message from Elektron Edge Device will break RFA internal directory cache.
This issue has been reported to development team.
The Readme file of the Consumer example has clearly indicated each consumer client must have it's own session and event queue. Your configuration shows all three consumer clients use the same session "Session1". If your connection is DACS enabled, the second and third client will receive login error because you can only login to the server once at a time. I tested the consumer with multiple clients connecting to server with either DACS enabled or disabled and they all worked fine with proper configuration. If you still encounter the same issue after changing your configuration, please turn on trace in the configuration, re-run the application and send the complete output file together with the source files to TRDC as suggested by Warat.