Is OmmConsumer::unregister a synchronous call?

nm
nm Newcomer

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.

Best Answer

  • umer.nalla
    umer.nalla LSEG
    Answer ✓

    Hi @nm

    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.

Answers