How to get Webscoket MarketPrice updates based on delay(5 sec for example) and not constant updates.

Hello, We have used your Java based Websocket MarketPrice batch example. It is working fine and we are getting updates continuously without any delay. However if we want to add a delay lets say of 5 seconds, then how can we do it. Now we are constantly receiving updates through websocket.
We need to add the rates in database but not too fast, atleast with delay of 5 seconds. Please assist where to mention the delay for this websocket based example to receive RIC updates in every 5 sec.
Best Answer
-
If you are using an in house TREP system, you can ask your Market Data team to setup a Conflated service for you which can limit updates to the configured interval period.
Otherwise, you could implement conflation logic at your application level, to limit how often your write to your database i.e. apply any updates to an application level representation for each RIC and then flush the object values to the database every 5 seconds if any values have changed.
0
Answers
-
Absolutely agree with @umer.nalla, conflated service would be the most efficient way.
As another option, one can request a snapshot request, every 5 seconds, for example:
{
"ID": 2,
"Key": {
"Name": "MSFT.O"
},
"Streaming": false
}0 -
What if we sleep the WebSocketAdapter Listener for 5 seconds in onTextMessage callback. We tried it, its working but don't know the impact. Will the latest update messages will be discarded by the Listener thread? We need to update the rates in database so continuous update without breadth is making the system slow. So please let us know if adding sleep in listener is one of the correct way to do it?
0 -
So, adding streaming=false, will give us the updates with a delay? and where should we specify the delay?
0 -
What if we sleep the WebSocketAdapter Listener for 5 seconds in onTextMessage callback. We tried it, its working but don't know the impact. Will the latest update messages will be discarded by the Listener thread? We need to update the rates in database so continuous update without breadth is making the system slow. So please let us know if adding sleep in listener is one of the correct way to do it?
And if not the above, as @zoya faberov suggested doing streaming=false will help.
So it will gives us the delayed rates. Where can we specify the the delay?
suggestred0 -
Specifying non streaming request will give you only one image response, which you will have to snap again, every 5 seconds. A better approach is to have the service conflate the streaming updates at source.
0 -
Sleeping in the callback is not recommended as, it does not slow down the incoming updates, but will queue them in an internal buffer instead. So after 1 minute, your application will be getting data which is 1 minute old, and after a while application might crash, due to memory overrun.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 249 ETA
- 554 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 643 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 192 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛