Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Elektron /
  • EMA /
avatar image
Question by Raj.Huang · Jul 25, 2017 at 03:09 AM · consumerheartbeatping req

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.

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

3 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by wasin.waeosri · Jul 25, 2017 at 03:56 AM

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"
StatusMsgEnd

The 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.

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Raj.Huang · Jul 25, 2017 at 04:14 AM 0
Share

Thank you very much! I got it!

avatar image
REFINITIV
Answer by wasin.waeosri · Jul 25, 2017 at 03:21 AM

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.

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Raj.Huang · Jul 25, 2017 at 03:32 AM 0
Share

Hi @Wasin Waeosri,

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?

avatar image
REFINITIV
Answer by brian.sandri · Jul 25, 2017 at 02:07 PM

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.

Comment
jirapongse.phuriphanvichai

People who like this

1 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
7 People are following this question.

Related Questions

[EMA Java] How to retrieve the client id in OmmConsumerClient.onStatusMsg

[EMA C++] DoNotCache and ClearCache in RefreshMessage from the point of view of Consumer Application

Symbol List Request and Refresh Messages

Conflated mechanism advantage

Comsumer example 370

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges