MRN News Issue in registering for PNAC inside the callback

Hello ,

I am developing a news Consumer (N2_UBMNS - MRN News) . I understood the flow of resubscribing to PNAC's on update messages ,

however , when I am subscribing again using the same OmmConsumer with PNAC received , I am not getting any further data .

I am subscribing inside the onUpdate function of the Client.

However , if I hardcode the PNAC and subscribe , I am getting further data .

Is there any thing that happens internally after the onUpdate callback , that is blocking my subscription request to the Provider ?

I would like to know the best approach to subscribe again and the maximum PNAC's that can be subscribed using the same OMMConsumer object .

void NewsClient::decode(const FieldList& fl) {

// adding PNAC into an OmmArray
registerAgain(pnacArray); // registetring the array with same Consumer

}

Kinldy help resolve this

Thanks in advance

Best Answer

  • Hi @yajnasteju

    You should be able to call registerClient() inside onUpdate().

    It looks more like you have a problem with your registerAgain() function.

    Since PNAC is a single RIC, I don't understand why you have to add PNAC into an OmmArray.

    Here I modified the 310 training example to subscribe PNAC inside onUpdate(), please take a look.

    310-marketprice-rmtes.zip

Answers

  • Hi @Warat.B

    Thanks for your support . It is working , I jus changed the array part as you said .

    Also can you please help me differentiate between a news headline and a story

  • You mean, differentiate between N2_UBMS and the story you access via PNAC?

    You can just check the RIC name in your callback. Beside, the story that you subscribe from PNAC will always come as a refresh, while the headline from N2_UBMS will come as an update.