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?

Best Answer

  • wasin.w
    wasin.w admin
    Answer ✓

    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.

Answers