RegisterClient and Client callback

I have a consumer app that request MMT_MARKET_PRICE snapshot (ReqMsg.InteractionTypeFlag.InitialImage) to a bunch of RICs every minute or so.

It has 1 instance of OMMConsumer that call RegisterClient but passing a separate instance of Client callback relevant for each unique RIC. The idea is to have ability to process each RIC separately depending the Client callback we hook up at RegisterClient call.

Pseudocode as below...

// build OMMItemSpec with RIC

var sepc = CreateOmmItemSpec(ric);

// get callback.. the actual code is different but similar idea.

var client = clientCallbackMap[ric];

// register topic

handle = m_consumer.RegisterClient(m_evtQueue, spec, client, closure);

In each different Client instances, we process messages via ProcessEvent callback as usual,

public void ProcessEvent(Event evt)

{

// Sub type specialise handling of RespMsg

}

At times, Client callback can receive unexpected content of different RIC. For example, a Client callback instance for GBP= received payload for FFIM9 RIC. Processing of each Client callback is single-threaded.

Is the scenario of assigning each RIC to different Client instance in RegisterClient call supported?

Best Answer

  • Gurpreet
    Answer ✓

    Yes, it is supported and you should be able to pass in any client instance. What language are you using?

    If you are unable to identify the issue in your code, isolate and post it here, so that we can look into it.