question

Upvotes
Accepted
5 1 0 2

Implement re-try logic in RFA API

Hi Refinitiv Team

One of our app teams want to implement a re-try logic if subscription fails (due to timeout, etc) in their application written by RFA API (8.2.0.L2.all).


Do you have any sample code that shows how to implement a re-try logic on app side?

#technologyrfa-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.

1 Answer

· Write an Answer
Upvotes
Accepted
24k 52 17 14

Hello @ryusuke.kamimura

I have checked the RFA Java example code. There is no "ready-to-use" re-try subscription logic example. However, the client application can perform the following steps to detect if subscription fail:

  1. Check the processEvent() callback method that if incoming event type is the OMM_ITEM_EVENT --> it means the application receives item response notification.
  2. Check the message type of that OMM_ITEM_EVENT
  3. If the message type is Refresh response message, it means the application receives data.
  4. If the message type is the Status response message, it means there are something with that subscription
  5. Check the Status response message detail (Stream State, Data State, Code, text). If it indicates that the subscription is fail, re-try subscription.

The client can find more detail on the following resources:

  • Section 12.2.6 Handling Inbound Events of the RFA Java Development Guide
  • RFA Java postingConsumer example (this example code shows how to handle Status Response Message via the processEvent() callback)

I hope this information helps.

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.

@ryusuke.kamimura

RFA internally supports request timeout via the following configuration.

1701165209723.png


1701165209723.png (16.1 KiB)
Hello @Jirapongse

Many thanks for the configuration. Let us see if we can increase timeout value on our side.

Hello @wasin.w

Many thanks for the detailed steps.

Let me cascade this with our developer.

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.