EMA OmmConsumer

zoe
zoe LSEG

API Version: RHEL8_64_GCC831

In EmaConfig.xml, we defined

<Consumer>

<Name value="consumer1"/>

<ChannelSet value="Channel_1, Channel_2"/>

<Logger value="Logger_1"/>

<Dictionary value="Dictionary_1"/>

<XmlTraceToStdout value="0"/>

</Consumer>


  1. When we construct OmmConsumer

mConsumer = new OmmConsumer(ommConsumerCfg);


If Channel_1 is not available, OmmException may be thrown

What is the suggest way to retry with Channel_2 when Channel_1 is not available during construct?


  1. What is the appropriate way to determine if the session is connected or disconnected from OmmConsumerEvent?


void EmaSession::onStatusMsg(const StatusMsg &statusMsg, const OmmConsumerEvent &event)


Tagged:

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @zoe

    Thank you for reaching out to us.

    With the ChannelSet configuration, if the Channel_1 is not available, EMA will try to use the Channel_2. You can check this from the API log.

    loggerMsg
        TimeStamp: 11:32:38.560
        ClientName: ChannelCallbackClient
        Severity: Warning
        Text:    Received ChannelDownReconnecting event on channel Channel_1
            Instance Name Consumer_1_1
            RsslReactor 0x00000227558EBBD0
            RsslChannel 0x00000227558EBBD0
            Error Id -1
            Internal sysError 10057
            Error Location D:\Jenkins\workspace\RTSDK_Core_DX1\OS\VS142-64\rcdev\source\rtsdk\Cpp-C\Eta\Impl\Reactor\rsslReactorWorker.c:2250
            Error Text <D:\Jenkins\workspace\RTSDK_Core_DX1\OS\VS142-64\rcdev\source\rtsdk\Cpp-C\Eta\Impl\Transport\rsslSocketTransportImpl.c:6165> Error: 1002 ipcConnecting() client connect() failed.  System errno: (10057)
    loggerMsgEnd


    loggerMsg
        TimeStamp: 11:32:45.619
        ClientName: ChannelCallbackClient
        Severity: Warning
        Text:    Received ChannelDownReconnecting event on channel Channel_2
            Instance Name Consumer_1_1
            RsslReactor 0x00000227558EBBD0
            RsslChannel 0x00000227558EBBD0
            Error Id -1
            Internal sysError 10057
            Error Location D:\Jenkins\workspace\RTSDK_Core_DX1\OS\VS142-64\rcdev\source\rtsdk\Cpp-C\Eta\Impl\Reactor\rsslReactorWorker.c:2250
            Error Text <D:\Jenkins\workspace\RTSDK_Core_DX1\OS\VS142-64\rcdev\source\rtsdk\Cpp-C\Eta\Impl\Transport\rsslSocketTransportImpl.c:6165> Error: 1002 ipcConnecting() client connect() failed.  System errno: (10057)
    loggerMsgEnd

    The exception is thrown due to the login request timeout (the LoginRequestTimeOut configuration).

    Exception Type='OmmInvalidUsageException', Text='login failed (timed out after waiting 45000 milliseconds)', ErrorCode='-4052'

    As far as I know, EMA is a high level API which manages connections on behalf of the application. Typically, you can check if the session is connected or disconnected from the API log.