What's the differrence between EMAJ consumer and ETAJ consumer?
I supposed that EMAJ is a better version to use, it includes some part of the ETAJ.
But I don't find the heartbeat part, in ETAJ doc , channel.ping(error) method can send the ping, but how to do in EMAJ consummer? Please help me, because it's urgent.
Best Answer
-
Hi @Raj.Huang
Basically, when the API is disconnected from server (server down, connection lost, etc), the application will receive notification via the OmmConsumerClient's onStatusMsg() callback function from the API. The example of server down notification is following
StatusMsg
streamId="5"
domain="MarketPrice Domain"
state="Open / Suspect / None / 'channel down.'"
name="IBM.N"
serviceId="50888"
serviceName="ELEKTRON_DD"
StatusMsgEndThe EMA Java API will try to reconnect and recover subscriptions to the server for the application. The application does not need to manual connect and re-subscribe data. Once that TREP server is back online, the API will automatic reconnect and resubscribe items for the application.
I suggest you check the Elektron Message API Java Quick Start page to run the EMA Java examples which will give you more information about how the API handles connection for the application.
Please note that the EMA Java example is hard coded to run for 60 seconds before calling the OMMConsuer.uninitialize() function to log out and disconnect from server. You need to change the 60000 milliseconds value to make it run longer.
0
Answers
-
Hello @Raj.Huang
Basically, the EMA Java API maintains a connection between the API and server for the application. The application does not need to manual send ping to the server, the API automatically does it for the application. The API keeps connects to the server until the application call OMMConsuer.uninitialize() function.
Why do you need to manual send ping?
Please note that EMA API is not "a better" API than ETA API. It is the higher level and easier to implement API. If the application needs the high performance and what to manual control everything, ETA API which is a lower level API is a better option.
0 -
Thanks for your reply. You mean I don't be concern about the lost of connection ? But in case the server is offline, shouldn't we receive the notification right away? To avoid this situation, the general way is to send/detect heartbeat package, right?
0 -
Thank you very much! I got it!
0 -
ETA and EMA are both part of the Elektron SDK. EMA (Elektron Message API) is the higher level ease of use entry point and ETA (Elektron Transport API) is the lower level transport layer API. Because ETA is lower level, it does require the user to manage things like heart beats, while EMA does not since it does this for its users. ETA provides more flexibility and configurability to allow a wide variety of use cases and lowest latency/highest throughput but will require more code to use it and more understanding of the underlying system and network. EMA is built on top of ETA and leverages the same functionality, but takes care of many things on behalf of the user to make the application space as simple and straight forward as possible.
You may want to take a look at the API Concepts guide that is in the Docs folder of the Elektron SDK distribution package. Chapter 2 gives a high level description of the various APIs and talks about the tradeoffs, performance, and different functionalities expected by the user vs. API. This should help you understand both so you can choose the entry point that makes most sense for you.
1
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 中文论坛