Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Elektron /
  • EMA /
avatar image
Question by kc_1905 · Feb 11, 2020 at 01:03 PM · elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-apistatuschannel

How to determine which channel is down and reason in StatusMsg

Hi,

Im trying to process error handling for channel disconnections and errors. I can see that the Eleketron already logs an error containing the info that I want but the StatusMsg that I receive from the OmmConsumerClient do not have this info.


Below is what logs I see from the Elektron logs. I want to be able to get the Text containing Channel_1 and Channel_2 as well as the connection refused..

WARN 2020-02-11 06:08:37.199-0600 OmmConsumerImpl [pool-3-thread-1]- loggerMsg
    ClientName: ChannelCallbackClient
    Severity: Warning
    Text:    Received ChannelDownReconnecting event on channel Channel_2
        RsslReactor @5aaf0534
        RsslChannel @3c5be0d
        Error Id 0
        Internal sysError 0
        Error Location Reactor.processWorkerEvent
        Error text Error initializing channel: errorId=-1 text=Connection refused
loggerMsgEnd


ERROR 2020-02-11 06:08:42.206-0600 OmmConsumerImpl [pool-3-thread-1]- loggerMsg
    ClientName: ChannelCallbackClient
    Severity: Error
    Text:    Received ChannelDown event on channel Channel_1
        Instance Name ReutersConsumer_1
        RsslReactor @5aaf0534
        RsslChannel @5468f011
        Error Id 0
        Internal sysError 0
        Error Location Reactor.processWorkerEvent
        Error text Error initializing channel: errorId=-1 text=Connection refused
loggerMsgEnd


The StatusMsg that I received only tells that the channel has closed and does not tell which of the multiple channels is down.

WARN 2020-02-11 06:08:42.206-0600 LoginOMMConsumerClient [pool-3-thread-1]- Login state is not OK. State=Closed / Suspect / None / 'channel closed', Msg=StatusMsg
    streamId="1"
    domain="Login Domain"
    state="Closed / Suspect / None / 'channel closed'"
    name="DEV"
    nameType="1"
StatusMsgEnd


Thanks

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

4 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by umer.nalla · Feb 11, 2020 at 04:44 PM

Hi @kc_1905

I also just remembered that the OmmConsumerEvent has a channelInformation() / getChannelInformation() method which allows you to access various attributes of the Channel associated with that event.

That should make things easier - as you can just access this in the onStatusMsg() event handler

See this other post for some more information and discussion around this issue

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
kc_1905 · Feb 12, 2020 at 09:05 AM 0
Share

Hi, I checked the channelInformation from the consumer event but I think it only applies when the initial connection has been established.

If it cant connect for first time the channel info details like host values returns null.

StatusMsg will only have Channel Down description

Logs below uses "localhost:14002" host and port in Channel config

WARN 2020-02-12 09:01:21.636+0000 OmmConsumerImpl [main]- loggerMsg
    ClientName: ChannelCallbackClient
    Severity: Warning
    Text:    Received ChannelDownReconnecting event on channel Channel_1
    RsslReactor @15d49048
    RsslChannel @7098b907
    Error Id 0
    Internal sysError 0
    Error Location Reactor.processWorkerEvent
    Error text Error initializing channel: errorId=-1 text=Connection refused
loggerMsgEnd


INFO 2020-02-12 09:01:21.645+0000 LoginOMMConsumerClient [main]- CHANNEL INFO
hostname: null
    IP address: null
    connected component info: null
    channel state: closed
    connection type: unknown
    protocol type: unknown wire format
    major version: 0
    minor version: 0
    ping timeout: 0
    
WARN 2020-02-12 09:01:21.649+0000 LoginOMMConsumerClient [main]- Login state is not OK. State=Open / Suspect / None / 'channel down', Msg=StatusMsg
    streamId="1"
    domain="Login Domain"
    state="Open / Suspect / None / 'channel down'"
StatusMsgEnd
avatar image
REFINITIV
Answer by umer.nalla · Feb 11, 2020 at 04:39 PM

Hi @kc_1905

Have you referred to the 170__MarketPrice__ChannelInfo examples available in the 100 Series folder of the EMA Examples that come with the Elektron SDK?

This demonstrates how to get the Channel information for each OmmConsumer instance.

Does this meet your requirement?

You may also be interested 422__MarketPrice__ErrorClient example in the 400 series folder which lets you capture errors using an Error Client.

Comment
kc_1905

People who like this

1 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
kc_1905 · Feb 12, 2020 at 09:07 AM 0
Share

Thanks. Ill check the error client and see I can capture more errors that I am after



avatar image
REFINITIV
Answer by zoya faberov · Feb 11, 2020 at 05:08 PM

Hello @kc_1905,

I think it's a valid point and idea that you bring up, with multiple channels, this potentially may be a useful information to receive on channel closed.

EMA application tier code is not in control of status message content or wording.

Two approaches I can think of:

One is, to suggest this as an enhancement to Elektron SDK development team, you can reach them directly via Refinitiv Elektron SDK on GutHub. The enhancement request will be evaluated and if accepted, prioritized. Does this sound like what you would prefer, will you be able to proceed, or like us to create the request, on your behalf?

The other path comes from the fact that the library source code is available to you, Elektron SDK source code is included also on GitHub, and you are able to branch and modify locally, and rebuild, this you can do immediately, but we note that this approach requires more in-depth understanding, time and effort. Once completed, you may wish to submit your enhancement to ESK development and it may be evaluated and accepted for the main code base, otherwise it will remain in your local branch only.


Comment
kc_1905

People who like this

1 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
kc_1905 · Feb 12, 2020 at 09:15 AM 0
Share

Is enhancement request the same as "issue" ? Never worked with github before sorry.

avatar image
REFINITIV
Answer by zoya faberov · Feb 12, 2020 at 05:25 PM

Hello @kc_1905,

Please consider the suggestion by @Umer Nalla, as it looks to cover your use case:

getChannelInfo() call, from onStatusMsg calback, on disconnect, should provide you with the connection info for the channel, allowing to identify the broken channel?

While on the initial connection, on login, if the connection fails, getChannelInfo will be null, but at that point the application has a way of tracking what channel was requested by consumer?

EMA attempts to seamlessly recover on behalf of the application whenever possible, so with more then one channel on the ChannelSet, it will try the next channel on the channel set, exhaustively,

Prior to tracking an enhancement, and yes, there is no separate enhancement request on GitHub so issue request is used to track.

Comment

People who like this

0 Show 3 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
kc_1905 · Feb 13, 2020 at 09:28 AM 0
Share

Yea, I will definitely use getChannelInformation for disconnects to try and retrieve information. I will just have to work with whats available at the moment.

avatar image
REFINITIV
umer.nalla ♦♦ kc_1905 · Feb 13, 2020 at 09:50 AM 0
Share

Hi @kc_1905

Thanks for the update.

Just to reinforce my colleagues comment about using a ChannelSet - if you are not already doing so. This will allow the API to attempt connection to alternative servers at startup and if/when a connection is lost during runtime - on your behalf.

EMA Connection and Item Recovery

EMA Config Overview

avatar image
kc_1905 umer.nalla ♦♦ · Feb 13, 2020 at 11:52 AM 0
Share

Thanks. ChannelSet is already being used. Really good near-instant reconnect when a channel goes down.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
8 People are following this question.

Related Questions

Login Domain - Components and Elements in Login responses

EMA Java - What triggers StatusMsg without state

The relationship between consumer channels and consumer events

(JAVA) Does using interestAfterRefresh(false) remove the need for deregistering items with Elektron?

EMA CPP - Exception adding ric into OmmArray

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges