How to Call onUpdateMsg() method when we are Using EMA Batch Request?

How to Call onUpdateMsg() method when we are Using EMA Batch Request?

Best Answer

  • The onUpdateMsg() should be called when the consumer received an update message, e.g. when there is a new quote or new trade.

    However, please make sure that you haven't set the interestAfterRefresh to false.

    UInt64 handle = consumer.registerClient( ReqMsg().serviceName( "API_ELEKTRON_EPD_RSSL" ).payload( ElementList().addArray( ENAME_BATCH_ITEM_LIST, OmmArray().addAscii( "JPY=" ).addAscii( "EUR=" ).complete() ).complete() ).interestAfterRefresh( true ) , client );

Answers

  • Which EMA edition that you are using? I assumed that you are using Java edition, am I right?

  • I am Using C++ edition

  • Hi @nishikarale

    The developer does not call onUpdateMsg() , the API will call it as and when any new updates arrive from the server.

    This is assuming that interestAfterRefresh() has not been set to false in your code - the default is true and it means that you interested in receiving updates after the Refresh (the first message with full field list) has been received.