How to get a list of items per request.
Hello.
We are trying to transfer our code from RFA to EME (as adviced here: https://community.developers.refinitiv.com/questions/80627/after-switching-deployed-application-with-rfa-to-n.html?childToView=80967#answer-80967). But from totorial looks like we can get data only for a one item per request. So my question is this a usual situation or is it possible to get data for the list of items per request? And how we can inform our application what all data already requested and ready for use instead of waiting one or more minuts (Thread.sleep(60000);).
Could you please give me a piece of code or link to the suitable example.
Thank you in advance.
Best Answer
-
Hello @anton.filimonov.ext
You can request multiple items in one request message using the Batch feature. Please see more detail in the following resources:
- EMA Java example: ex370_MP_Batch
- Enterprise Messaging API (Java) - Batch and View features article
Could you please clarify the "how we can inform our application what all data already requested and ready for use instead" message? Basically, when the API receives item data from the Provider, it will dispatch to the onRefreshMsg and onUpdateMsg callback functions on the application side. If you want to know if all item data has been received, you can count the number of item refresh response messages in the onRefreshMsg callback function.
I suggest you check the following resources regarding the Refinitiv Real-Time behavior:
0
Answers
-
Hello wasin.waeosri. Thank you for your response and your help. More or less your understand my question right. So, I will try to look on your links before. I hope they helps me fix my issue.
0 -
Note that for the examples you are looking at the Thread.sleep(60000) is just there to allow the example to run for a while before exiting. The data/event callbacks are on the API thread context and invoked asynchronously - please follow the advice above as provided by my colleague.
1 -
thanks
for more information
Impression of Planet Proxima Centauri with New the stars, Centauri a and Centauri B - Information about Proxima Centauri .
0 -
New question from my side.
In RFA was possible set the quality of request. For example Best/Worst rate and Best/Worst Timeliness. Is this attributes so critical and how we can set them in EMA api?
Tahnk you in advance.
1 -
Can you confirm if you have multiple source/services available on your infrastructure that provide different QOS in terms of rate and Timeliness - otherwise these QOS settings will have no impact?
With regards, how to set the QOS please see the Ema example 101_MP_QosPriority included with the RTSDK which shows how to set the best rates.
e.g. for EMA Java
consumer.registerClient(reqMsg.serviceName("DIRECT_FEED").name("IBM.N").qos(Timeliness.REALTIME, Rate.TICK_BY_TICK).priority(2,1), appClient);
1 -
Thank you for your replay.
Yes, I have already seen this example. But looks like it is possible set only Best values and not Worst.
I am new in this API, and can't answer compleatly on your question. But looks like we have only one service for request. So, you can advice to us not use quality attributes, isn't it?
And only for more understanding of answear on my question "how we can inform our application what all data already requested and ready for use instead". wasin.waeosri advised store number of items which we requested and every time then onRefreshMsg or onUpdatehMsg calls we should calculate the namber of this call for the unique item and compare it with the stored value (number of requested items). But in real situation I can see that if I request data for the 40 items for example then I will receive may be 10 or a little bit more number of fresh data. So we finishing waiting data after one minute left instead to receiving all 40 (for example) responces (items). Overwise we should wait for the wole list of item wole day or may be more.
Sorry for my English. If this is not understandable, please tell me, I will try to parafrase it.
0 -
The Qos functionality is applicable where a customer has access to multiple services with differing QOS levels - so they can specify the rates they are prepared to accept. If you have only a single source then setting the QOs is not applicable.
With regards to your other question, when you registerclient() an instrument, you should always receive one of the following
- an initial RefreshMsg for each valid instrument
- a StatusMsg with Closed state for any invalid request (e.g. not licenced to the RIC, invalid RIC code or RIC not available for some other reason).
So, if you count the number of RefreshMsg + Status Msg with Close stream state - this should provide a way of confirming when all instrument requests have been processed and responded to by the server.
e.g.
statusMsg.getState().getStreamState() == StreamState::ClosedEnum
where StreamState::ClosedEnum indicates the Stream was closed.
For the RefreshMsg - you should also only count if it is a Solicited Refresh Msg
refreshMsg.getSolicited()
to ensure it is the initial Refresh for an instrument - not a subsequent one (e.g. received after data recovery scenario).
1
Categories
- All Categories
- 6 AHS
- 37 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 中文论坛