question

Upvotes
Accepted
2 1 2 8

How to make OmmConsumerClient recover from Open / Suspect / None state

hey,

I consume RICs from TREP using this way:

ReqMsg reqMsg = EmaFactory.createReqMsg().serviceName(serviceName).name(ric);
long streamId = consumer.registerClient(reqMsg, new Client(...));

class Client implements OmmConsumerClient {
    @Override
    public void onRefreshMsg(RefreshMsg msg, OmmConsumerEvent consumerEvent) {
        // do something with the status and payload
    }
    @Override
    public void onUpdateMsg(UpdateMsg msg, OmmConsumerEvent consumerEvent) {
       // make use of payload
    }

    @Override
    public void onStatusMsg(StatusMsg msg, OmmConsumerEvent consumerEvent) {
       // make use of ommstate
    }
}

The consumption is going ok, i.e. after subscribing I get a refresh message, and then update messages with payload.

When there is a problem with a connection, a state update comes in, in a form of status message. The state is: ""Open / Suspect / None / 'A23: Source has gone down, requesting from another source.'".

However, the RIC is fixed on a server after some time and is flowing again, but NOT to my application, this subscription goes stale. How can I set up the subscription so that it recovers, when the RIC is alive again?

One workaround is to kill this subscription and recreate it - this works fine, but doesn't seem to be the best way.

ema-apijavaOMMommconsumer
icon clock
10 |1500

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

Upvote
Accepted
17.4k 34 12 12

Hello @Konrad

The stream state "Open / Suspect" indicates that the item stream remains opened but data is not available. The application should be able to receive data as usual after the service is recovered.

Can you replicate the issue on demand? If so, please enable the EMA XML trace message and replicate the issue. The XML trace messages contain incoming/outgoing messages between the API and ADS server. It helps to verify if the API receives any messages from the ADS after recovery.

Please check the XML Trace section of the Enterprise Message API (EMA) - Configuration Overview article to see how to enable the EMA trace messages.

Additionally, can you give us more detail about the application that encounters the issue?

  • Is it EMA Java or C/C++?
  • The version of EMA
  • OS
  • Compiler


icon clock
10 |1500

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

thanks very much for the suggestions - the problem is not reproducible anymore, therefore I will close this question.

Upvote
17.2k 47 13 19

Hi @Konrad,

The A23 message is coming from RTDS (TREP), and it seems like your ADS is having issues getting an item. This is best resolved at the infrastructure level by asking the market data administrator. From the EMA perspective, the item state is OPEN - a.k.a it might be resolved and be available in future and hence no action will be taken by SDK automatically.

icon clock
10 |1500

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

Hi Gurpreet, please read my question carefully - I don't have an issue with ADS, but with SDK - the thing is it does NOT resolve it automatically and an update is not flowing in, once the ric is fixed in ADS. How to set up the SDK so that the updates are flowing in once the ric is OK?

Hi @Konrad, if the ADS doesn't send a refresh or updated status message after the item is recovered then it is an issue with ADS. This is not an SDK issue - the state "Open" means that ADS is telling EMA that the item will automatically recover and EMA client does not need to take any action yet.

If you think this is an issue with SDK, then I recommend that you raise it directly with RTSDK development on github.


ADS does send a refresh or status message after recovery - I can see it in the other apps - it's only this one that doesn't get it. That's what I'm asking about.