RFA api randomly takes considerable time before closing the event stream

Hello,

We are using RFA 8.1 C++ api to consume L1 and L2 market data. Lately we have observed that RFA takes considerable time (some times more than 1 min) to close the event after ``unregisterClient` is called. So if you refer below diagram then time lapsed between Event A and Event B is more than 1 minute some times.


This happens randomly. May I know why this can happen? We have been running same RFA application for more than a year now but never faced this issue. Only thing that have changed in last couple of weeks is we enabled Open DACS. I am not sure why this would cause a problem?


1695631055658.png


Best Answer

  • @mktdata

    Thank you for reaching out to us.

    As I know, when the application calls the unregiterClient() to unregister an interest in market information, the API will send the close item request to TREP. However, TREP will not send anything back to the client.

    Are you using the completion event when creating the OMMConsumer?

    virtual OMMConsumer* rfa::sessionLayer::Session::createOMMConsumer    (    const rfa::common::RFA_String &     name,
    bool     wCompEvents = false
    )

    If yes, the RFA API will create a completion event and add the event into an event queue. Thus, if there are many events in the event queue, it can take sometime to get this completion event.

Answers

  • @Jirapongse Yes we pass "wCompEvents = true". I am not sure how can we justify 1 minute 22 seconds response time that we have seen.

  • @mktdata

    Did the application still get other events from the event queue after calling the unregister method?

    The event queue may contain other events so the application needs to dispatch those events before getting the completion event.