Refinitiv / Real-Time-SDK

Other
180 stars 128 forks source link

OmmNIProvider doesn't use the full ChannelSet #30

Closed thomasthebaker closed 7 years ago

thomasthebaker commented 7 years ago

I've been able to successfully use the ChannelSet configuration with the OmmConsumerImpl. The consumer has a ChannelSet with two different ADS servers. When one server goes down the reactor picks up another channel from the ChannelSet and starts using that. The subscription messages keep flowing after the consumer picks up the new channel.

I can see that the OmmNIProviderImpl can be configured to use a ChannelSet. However, it seems to just stick to the first channel in the ChannelSet. When the underlying channels disconnect during failures the OmmNIProviderImpl doesn't pick up the other channels. It keeps using the first channel in the ChannelSet. Also if it times out connecting to the first channel it doesn't try the next channel after the login timeout.

Here is a log output of an NI Provider configured with two ADH servers in a channel set. It initially connects to the first channel and successfully sends data. When I stop that ADH server you can see that second channel gets activated and connects out to the seconds ADH. However the OmmNIProvider doesn't seem to use the new channel. It keeps accepting messages but never sends them to the ADH as it maintains a link to the disconnected channel.

2017-06-16 15:55:25,711 WARN  [pool-12-thread-1] OmmNiProviderImpl - loggerMsg
    ClientName: ChannelCallbackClient
    Severity: Warning
    Text:    Received ChannelDownReconnecting event on channel ADH_CH2_DEV
    RsslReactor @46d03ade
    RsslChannel @4817cc74
    Error Id 0
    Internal sysError 0
    Error Location null
    Error text SocketChannel.read returned -1 (end-of-stream)
loggerMsgEnd

2017-06-16 15:55:26,203 DEBUG [OmmPublishWorker_0] OmmPublisherWorker - Publishing UPDATE for STAT.TEST
2017-06-16 15:55:26,203 ERROR [OmmPublishWorker_0] OmmNiProviderImpl - loggerMsg
    ClientName: NIPROVIDER_DEV_2
    Severity: Error
    Text:    Internal error: rsslChannel.submit() failed in OmmNiProviderImpl.submit(UpdateMsg)RsslChannel 0
    Error Id -1
    Internal sysError 0
    Error Location Reactor.submitChannel
    Error Text ReactorChannel is closed, aborting.
loggerMsgEnd

2017-06-16 15:55:26,204 WARN  [OmmPublishWorker_0] ProviderErrorClient - onInvalidUsage: Failed to submit UpdateMsg. Reason: ReactorReturnCodes.FAILURE. Error text: ReactorChannel is closed, aborting.
2017-06-16 15:55:26,748 INFO  [pool-12-thread-1] OmmNiProviderImpl - loggerMsg
    ClientName: ChannelCallbackClient
    Severity: Info
    Text:    Received ChannelUp event on channel ADH_CH1_DEV
    Instance Name NIPROVIDER_DEV_2
    Component Version adh2.6.9.L1.linux.tis.rrg 64-bit
loggerMsgEnd

My provider is configured with these properties:

...
             <Channel>
                <Name value="ADH_CH1_DEV"/>
                <GuaranteedOutputBuffers value="5000"/>
                <Host value="<adh1>"/>
                <Port value="14003"/>
            </Channel>
            <Channel>
                <Name value="ADH_CH2_DEV"/>
                <GuaranteedOutputBuffers value="5000"/>
                <Host value="<adh2>"/>
                <Port value="14003"/>
            </Channel>
...
            <NiProvider>
                <Name value="NIPROVIDER_DEV"/>
                <ChannelSet value="ADH_CH2_DEV, ADH_CH1_DEV"/>
                <ReconnectAttemptLimit value="2"/>
            </NiProvider>
tmurthy commented 7 years ago

Hi Tom,

ChannelSet configuration is supported only for Consumers. As you see in the EMAJ_ConfigGuide (section 3.2.4), only Channel parameter is supported for NI_Providers

maydu commented 7 years ago

The enhancement requirement has been captured in ESDK-651.

maydu commented 6 years ago

The enhancement for supporting ChannelSet on EMA NIProvider has been added into Elektron-SDK_1.1.1 release. Thanks for your support.