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
Best Answer
-
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
0
Answers
-
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.
1 -
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.
1 -
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'"
StatusMsgEnd0 -
Thanks. Ill check the error client and see I can capture more errors that I am after
0 -
Is enhancement request the same as "issue" ? Never worked with github before sorry.
0 -
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.
0 -
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.
0 -
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.
0 -
Thanks. ChannelSet is already being used. Really good near-instant reconnect when a channel goes down.
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛