question

Upvotes
Accepted
18 1 3 5

Resume after a COMPLETION EVENT

Hi ,

When this is a completion event update for a ric,
It seems the pricing stream for that ric will be stopped.
and it cannot resume after the ric status become "OPEN"
We have to restart the program to resume.

Can we trigger the "resume" in program to handle this case , thanks

we are using RFA version (Version: 8.0.0.E2.all)

public void processEvent(Event event)
{
if (event.getType() == Event.COMPLETION_EVENT)
{
System.out.println(_className + ": Receive a COMPLETION_EVENT, " + event.getHandle() + " "+ event.getInterestSpec().toString());
return;
}
}

treprfarfa-api
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
9.6k 10 7 7

Hello @Raymond

A Completion Event is a specific type of Event guaranteed to be the last Event.

The Completion Event notifies the application that the event stream is closed. The application does not receive any data or any event from this stream any more. That's why you saw the pricing stream for that ric be stopped. To get data again, the application has to re-subscribe the item/RIC.

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
18 1 3 5

Thanks Pimchaya

Can you suggest the way to re-subscribe the item ?

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.

Hello @Raymond

Re-subscribing the item is sending an item request again. It is the same way as you subscribe an item after logging in successfully. After you re-subscribe the item, new Handle instance will be returned from OMMConsumer.registerClient(..)

For example: to re-subscribe an item in StarterConsumer example shipped with RFA Java package(<RFA Java Package>\Examples\com\reuters\rfa\example\omm\cons), call ItemManager.sendRequest();

Upvotes
25.3k 87 12 25

Hi @Raymond

It would also be useful to understand why you are getting a Completion event in the first place?

Are you doing snapshot request, or are you unregistering interest in the instrument? Or is the server closing the instrument off?

If the server is closing off the instrument for some reason, then it may not be worth re-requesting the instrument immediately or after a while. E.g. if an instrument has expired then there would be no point re-requesting it again.

Do you get any meaningful status msg codes / text prior to the completion event?

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
18 1 3 5

Hi Umer,

Our RFA program is getting the redistribute rate from a Reuters application.

We found that the redistribute rate status will become "CLOSED" after the weekend restart for the Reuters application and the RFA program cannot resume automatically.

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
25.3k 87 12 25

hi @Raymond

Do you know how long the weekend restart of the provider application takes, before the instruments are available again?

If so, then you could set a timer (once you receive Completion events) to re-subscribe the instruments after that time period has elapsed. You can re-subscribe by re-registering interest in the instruments - as described by my colleague Pimchaya in his comments earlier.

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.