How do I know when the dictionary refresh is complete?
When requesting a dictionary I can't tell when I've received all the messages. Currently I get 4 refresh messages with the field dictionary spread accross them. How can I tell in Elektron that I have no more messages pending? In RFA you can set completion events or check the connection state but I can't find the equivalent in Elektron.
Here's the request I send:
DictionaryClient dictionaryClient = new DictionaryClient();
long fieldHandle = consumer.registerClient(EmaFactory.createReqMsg()
.domainType(EmaRdm.MMT_DICTIONARY)
.name("RWFFld")
.serviceName("REPUB")
.initialImage(true)
.interestAfterRefresh(false) //SNAPSHOT
.filter(EmaRdm.DICTIONARY_NORMAL), dictionaryClient);
Best Answer
-
Hello @tbaker,
Elektron-SDK1.1.0.java was released on the last Friday (April 28, 2017).
I've tested it with the same scenario, it seems like the API can give a correct result now.
// Register Items
ReqMsg reqMsg = EmaFactory.createReqMsg();
consumer.registerClient(reqMsg.clear().serviceName("myServiceName").name("RWFFld").domainType(DomainTypes.DICTIONARY).filter(7), appClient);
consumer.registerClient(reqMsg.clear().serviceName("myServiceName").name("RWFEnum").domainType(DomainTypes.DICTIONARY).filter(7), appClient);
consumer.registerClient(reqMsg.clear().serviceName("myServiceName").name("JPY=").domainType(DomainTypes.MARKET_PRICE), appClient);
consumer.registerClient(reqMsg.clear().serviceName("myServiceName").name("BB.TO").domainType(DomainTypes.MARKET_BY_PRICE), appClient);
// onRefreshMsg Callback Method
public void onRefreshMsg(RefreshMsg refreshMsg, OmmConsumerEvent event)
{
System.out.println("refreshMsg.domainType(): " + DomainTypes.toString(refreshMsg.domainType()));
System.out.println("refreshMsg.name(): " + refreshMsg.name());
System.out.println("refreshMsg.complete(): " + refreshMsg.complete());
}Here is the result:
refreshMsg.domainType(): DICTIONARY
refreshMsg.name(): RWFFld
refreshMsg.complete(): true
refreshMsg.domainType(): DICTIONARY
refreshMsg.name(): RWFEnum
refreshMsg.complete(): true
refreshMsg.domainType(): MARKET_PRICE
refreshMsg.name(): JPY=
refreshMsg.complete(): true
refreshMsg.domainType(): MARKET_BY_PRICE
refreshMsg.name(): BB.TO
refreshMsg.complete(): trueTo download the latest version of EMA Java, please access this link.
Hope this helps!
1
Answers
-
Hi @tbaker
You can determine if a refresh message is complete by using the complete() method on the refreshMsg object when receiving your response(s). Refer to the Multi-Part messages section within the EMA Consumer - Requesting, Parsing and decoding level 2 data tutorial as a guide.
0 -
Hi @tbaker,
According to the reference manual in the Ema package, the following subclasses of Msg provide a complete() method for checking whether the current message object is a final part of all multi-parts or not.
RefreshMsg - a complete() returns true if this is the last part of the multi part refresh message.
GenericMsg - a complete() returns true if this is a one part generic message or the final part of the multi part generic message.
PostMsg - a complete() returns true if this is the last part of the multi part post message.Note that there are only three message types; Refresh, Generic, and Post that support message fragmentation. Therefore, message types other than above don't provide the complete() method.
Hope this helps.
0 -
Thanks for the response. I am processing the RefreshMsg but complete() remains false. I end up getting 5 messages if I don't set the service name. All messages have the following Complete and State values:
Complete: false, state: Open / Ok / None / ''
Perhaps the dictionary messages aren't multipart but are just separate dictionary sections. Multipart is also set to false and there are no part numbers.
0 -
Hello @tbaker,
I've also experienced the same issue when the Dictionary domain involved with the subscription. Therefore, I'll escalate this issue to the Development team.
0 -
Ok. thanks for raising. Is there any visibility on the issues raised with the development team? There's not a lot of activity on the github page and I don't know if there is a separate ticket tracking available on thomsonreuters.
0 -
@tbaker, I have an update regarding this issue. It will be fixed in the next maintenance release of Elektron SDK Java, yet I don't know the exact release date.
I'll keep you posted when the new version is available.
0 -
Great. Many thanks for the help.
0 -
Please check my recent answer for the fix of this issue.
0 -
Hi Nipat,
I've tested with 1.1.0 and the completion events do work now for dictionary requests. Thanks for helping!
I found a different bug in 1.1.0 which I raised on github (https://github.com/thomsonreuters/Elektron-SDK/issues/26), so we can't move to the fix yet. We have a workaround that we can use until the next Elektron SDK is released.
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛