It looks like call to OmmConsumer::unregister is synchronous. We are moving from RFA where equivalent call to rfa::sessionLayer::MarketDataSubscriber::unsubscribe was asynchronous. Is OmmConsumer::unregister a synchronous call? If yes, is there an asynchronous call for unsubscribe? Thanks.
I have received confirmation that this is by design that only the dispatching thread can submit message within the callback methods as the dispatching thread acquires the lock when calling the rsslReactorDispatch method.
The lock is needed to streamline the locking flow between the EMA and the Reactor layers as the Reactor has its own locking as well.
RFA works because it does not use the Reactor and it uses its own message queue to dispatch events from RFA.
So, in answer to your other question there is no 'asynchronous call' - i.e. none that does not use the lock for unsubscribing individual streams.
Can you expand on what behaviour of RFA MarketDataSubscriber you are trying to recreate with EMA or what EMA behavior suggests synchronous behaviour?
When you call OmmConsumer::unregister for a particular items handle, it relinquishes interest in an open item stream of that item. EMA will unsubscribe that item from the server.