Ema - no payload for batch requests in IProvider

Options
Grzegorz
Grzegorz Newcomer

Hello,

I am using EMA Refinitiv version 3.8.3.0 and I have implemented a consumer based on example ex370_MP_Batch. I have also created a stub component based on Provider example 102_MP_Snapshot.
Consumer communicates correctly with the provider, however provider does not receive the payload for batch request.

My use case is very similar use case as in this discussion
https://community.developers.refinitiv.com/discussion/101672/ema-batch-and-view-requests-to-iprovider?utm_source=community-search&utm_medium=organic-search&utm_term=EMA+batch

So I have enabled ENAME_SUPPORT_BATCH.

Still provider is not receiving a payload.
Do I need to do something extra in EMA 3.8.3.0 version?
How can I troubleshoot this, is there a place in EMA library that I can debug to get more information?

Thanks
Grzegorz

Answers

  • Hello @Grzegorz,

    Can you please provide the logs from what messages you receive. The batch request in the Java version of EMA is sent as individual subscription requests, so you should have received multiple subscribe messages in the iprovider.

    ReqMsg
      streamId="3"
      domain="MarketPrice Domain"
      name="CAD="
      serviceId="1"
      serviceName="DIRECT_FEED"
    ReqMsgEnd
    
    ReqMsg
      streamId="4"
      domain="MarketPrice Domain"
      name="JPY="
      serviceId="1"
      serviceName="DIRECT_FEED"
    ReqMsgEnd
    .
    .
    .
    

    You can also enable OMM logging to capture the messages sent and received by the SDK.

  • Grzegorz
    Grzegorz Newcomer

    Hello Gurpreet,

    Thanks for the quick reply.
    I am new to Refinitiv and I need to clarify my question a bit, sorry for that.

    This is a part of consumer example series300.ex370_MP_Batch.

    array.add(EmaFactory.createOmmArrayEntry().ascii("TRI.N"));
    array.add(EmaFactory.createOmmArrayEntry().ascii("IBM.N"));

    batch.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_BATCH_ITEM_LIST, array));

    consumer.registerClient(EmaFactory.createReqMsg().serviceName("DIRECT_FEED").payload(batch), appClient);

    So here the Consumer is registering a client using request message and that request message has a payload.
    The payload contains all of the instruments needed.

    So my only questions regarding this are:
    1. Will the provider (e.g. Provider example ex102_MP_Snapshot) receive the batch payload?
    2. Is there a possibility to retrieve this batch in some callback method from the interface OmmProviderClient?

    Besides that the example works fine for me.
    Consumer sends proper ReqMsgs and Provider responds back with the proper messages containing the payload.

    ReqMsg
    streamId="12"
    domain="MarketPrice Domain"
    name="/LLOY.L"
    serviceId="1"
    serviceName="DIRECT_FEED"
    ReqMsgEnd

    Thanks
    Grzegorz

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @Grzegorz

    Although the application includes batch requests in the payload, EMA processes each item individually. Therefore, with the following code, EMA will send two item requests to the provider.

    array.add(EmaFactory.createOmmArrayEntry().ascii("TRI.N"));

    array.add(EmaFactory.createOmmArrayEntry().ascii("IBM.N"));


    batch.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_BATCH_ITEM_LIST, array));


    consumer.registerClient(EmaFactory.createReqMsg().serviceName("DIRECT_FEED").payload(batch), appClient);

    The provider will retrieve two item requests.

    If you would like to test batch requests in the EMA IProvider, you need to run the ETA Consumer example.

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @Grzegorz

    After receiving a batch request, the IProvider needs to send responses for each item with an unique handle.
    However, I couldn't find a way for the IProvider to generate an unique handle for each item.

    If you have a RDC contact, you can submit this question to the API support team directly via Contact Premium Support. Otherwise, you can submit this question on GitHub.

  • Grzegorz
    Grzegorz Newcomer

    @Jirapongse

    Thanks for the quick reply.
    That answers my question.

    Thanks
    Grzegorz