I changed the 370_MP_Batch example to create the OmmConsumer with .operationModel(OmmConsumerConfig::UserDispatchEnum), then called consumer.dispatch(OmmConsumer::InfiniteWaitEnum); after registering the client. The result was that the registered client's onRefreshMsg was not called; the dispatch function returned zero immediately.
I then changed the code to call consumer.dispatch(10) repeatedly, and this worked; the callback's refreshMsg function was called.
This problem does not occur when requesting a single RIC (by invoking ".name(ric)" on the client; it only occurs when invoking ".payload( ... )" on it.
Can anyone tell me why it doesn't work? Below is the code that demonstrates the problem.
OmmConsumer consumer {
OmmConsumerConfig()
.host( host.c_str() )
.username( user.c_str() )
.operationModel(OmmConsumerConfig::UserDispatchEnum)
};
//auto consumer = makeSyncConsumer(host, user);
UInt64 handle = consumer.registerClient( ReqMsg().serviceName( "IDN_SELECTFEED" )
.interestAfterRefresh(false)
//.name("0#BAC*.U")
.payload( ElementList().addArray( ENAME_BATCH_ITEM_LIST, OmmArray().addAscii( "0#BAC*.U" ).addAscii( "0#TEF*.i" ).complete() ).complete() )
, client );
consumer.dispatch(OmmConsumer::InfiniteWaitEnum);