EMA Java - Request timeout

When we receive a StatusMsg like the following

StatusMsg    streamId="5"    domain="MarketPrice Domain"    state="Open / Suspect / None / 'Request timeout'"    name="TICKER"    serviceId="10"    serviceName="ELEKTRON_DD"StatusMsgEnd

Is it possible to close this stream with the given streamId when this occurs. This is to prevent EMA from sending repeated timeout status messages.


Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @xinjames.chen

    Thank you for reaching out to us.

    Yes, you can unregister an item calling the unregisterClient method with a handle (UInt64) returned by the registerClient method.

    However, if you use a batch request, you can get an item's handle from the AppClient::onStatusMsg callback method by calling the OmmConsumerEvent::getHandle() method inside the callback.

    Otherwise, you can change the RequestTimeout value in the consumer configuration. The default value is 15 seconds.

    1698812830716.png


Answers