question

Upvotes
Accepted
32 4 10 13

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?

treprfarfa-apicallback
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.

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question. Thanks, AHS

Hello @s.tang

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If so please can you click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question.

Thanks,

AHS

Hello @s.tang

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If so please can you click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
22k 58 14 21

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.

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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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