About off-stream contribution using EMA api

I am trying to create an off-stream contribution app using ema api


I was initially using the on-stream api

long handle = consumer.registerClient( EmaFactory.createReqMsg().serviceName("ATS").name(itemName), appClient);


But then I was told if I register the ric name, its considered on-stream api and it has some disadvantages.


Instead I should use off-stream api where I just create a client and start contributing using the generic handle that I receive.

long handle = consumer.registerClient( EmaFactory.createReqMsg().serviceName("ATS"), appClient);


But this just doesn't work. I am getting errors that the request is missing the name and invalid handle.


Could someone clarify on-stream vs off-stream contribution for me please.

Best Answer

  • wasin.w
    wasin.w admin
    Answer ✓

    Hello @sanjeet.karamchandani

    The difference between the on-stream and off-stream posts are the following:

    • On-Stream Post: Before sending an on-stream post, the client must first open (request) a data stream for an item. After opening the data stream, the client application can then send a post. The route of the post is determined by the route of the data stream.
    • Off-Stream Post: In an off-stream post, the client application can send a post for an item via a Login stream, regardless of whether a data stream first exists. The route of the post is determined by the Core Infrastructure (i.e., Refinitiv Real-Time Advanced Distribution Server, Refinitiv Real-Time Advanced Data Hub, etc.) configuration.

    In summary, On-Stream Post the application subscribes "ABC.CD" item and then sends the OMM Post message for the "ABC.CD" item data (with calculated fields, extra value, etc) with the "ABC.CD" item stream.

    The Off-Stream Post means the application sends the OMM Post message for the "ABC.CD" item data with the Login stream.

    I suggest you check the following ATS - Posting articles that give you a step-by-step guide and the example codes.

Answers