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.