question

Upvotes
Accepted
1 0 0 2

Omm - onAckMsg - Ric Code identifer in exception

Recently we experienced that TR didn't create ric code which we requested.

Because of this Index price which we were contributing thru EMA api was not acknowledged by Reuters and we were getting below exception in our log file.

The reject message looks like:

AckMsg

streamId="5"

domain="MarketPrice Domain"

ackId="63"

nackCode="DeniedBySource"

text="RIC has been disabled"

AckMsgEnd

Below is the implementation for above acknowledgement display.

public void onAckMsg(AckMsg ackMsg, OmmConsumerEvent consumerEvent) {

System.out.println("----- Ack message ----");

System.out.println(ackMsg);

System.out.println("Continue posting..."+"from "+name_);

}

Above exception doesn't have ric code identifier for which price submission failed. Can you pl let us know how we can capture ric code for which we are getting above exception? This is very important for us to know for which ric code price contribution failed.

elektronrefinitiv-realtimetrepinfrastructureOMM
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.

Upvotes
Accepted
23.5k 84 10 22

Hi @mahesh.ankulkar

It requires some programming logic to be implemented at the application level e.g. when you submit a post, you can store the PostID in the application level object that represents the RIC that you are posting for.

When you get the AckMsg, you can extract the AckId and do a lookup against your application-level object's PostID to determine which RIC the Ack relates to.

Alternatively, if you are using On-Stream posting - then you can use the Closure technique that my colleague Jirapongse described above.

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.

Upvotes
9.5k 10 5 7

Hello @mahesh.ankulkar

RIC in the Ack Message can be got from AckMsg.name() as an example snipped source code below:

if ( ackMsg.hasMsgKey() ) System.out.println("Item Name: " + ( ackMsg.hasName() ? ackMsg.name() : "not set" )); 

If the RIC is not in the Ack Message, the application can map Id(askId in ack message and postId in the post message) back to the RIC.

For example:

The example source code when the application sends a post message with postId 63 and the RIC is TRI.N:

((OmmConsumer)event.closure()).submit( postMsg.postId( 63 ).serviceId( 267 ).name( "TRI.N" ).solicitAck( true ).complete(true).payload(nestedRefreshMsg), event.handle() ); 

When the application receives an ack message with ackId 63:

AckMsg
    streamId="1"
    domain="MarketPrice Domain"
    ackId="63"
    nackCode="DeniedBySource"
    text="[500]: Unknown Item"
    serviceId="267"
AckMsgEnd

It means this ask message is for RIC TRI.N(The RIC is in post message which the same Id as the ask message).

Hope this help.

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.

Upvotes
45.2k 103 43 60

Using AckID to map to PostID is useful when you need to verify which post message has been failed. Therefore, you can verify the content and attributes of that post message.

From the NAK message, you are using on-stream posting. If you need to know a RIC associated with that event, you can use OmmConsumerEvent.handle() which returns a unique item identifier (a.k.a., item handle) associated by EMA with an open item stream. However, the application needs to maintain the mapping of item handles to RIC names.

Moreover, if you call OMMConsumer.registerClient to open a single item stream (not batch). You can specify a closure object which contains an item name.

registerClient(ReqMsg reqMsg, OmmConsumerClient client, java.lang.Object closure)

Then, in the onAckMsg callback, you can get the closure object by calling the OmmConsumerEvent.closure() method to get an item name.

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.

Upvotes
1 0 0 2

Thanks Pimchaya/Jirapongse

Yup noticed use of postid/ ackid but as this is asynchronous we will need to find ric code in log file for given postid. If acknowledgement returns ric code then this will be bit easy.

If not then we will need to first identify ackid which is failing then find ric code for this ackid.

We want to implement alerting in place to notify if submission failed because of missing Ric at reuters end.

Apologies if I am missing something.

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.