question

Upvotes
Accepted
72 2 6 14

How can I capture the ERROR message reactorChannelEventCallback

Hi Team,

Client is facing bellow ERROR sometimes which caused ChannelDown. And client can only restart the apps manually to subscribe data again. Client is asking how to capture the message of reactorChannelEventCallback, then they can reconnect automatically.

ClientName: ChannelCallbackClient
Severity: Error
Text: Received ChannelDown event on channel Channel
Instance Name EmaConsumer_1
RsslReactor @48918bb6
RsslChannel @14095b4d
Error Id -1
Internal sysError 0
Error Location WlItemHandler.dispatch
Error text ReactorCallbackReturnCodes.FAILURE was returned from defaultMsgCallback(). This caused the Reactor to shutdown.
loggerMsgEnd


Huge thanks

Gang

ema-api
icon clock
10 |1500

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

Upvotes
Accepted
25.4k 90 13 26

Hi @gang.chen1 and @ancoder

Just to confirm - to know the state of connectivity, you need to monitor the Status Msg for the Login Stream - not the market data item streams such as MarketPrice or others.

@gang.chen1 - regards your other question about - Received an item event with invalid message stream - this was asked previously by yourself: Received an item event with invalid message stream - Forum | Refinitiv Developer Community


icon clock
10 |1500

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

Upvote
25.4k 90 13 26

Hi @gang.chen1

There is a related question on the forum - EMA C++ - Reconnection to ADS - Forum | Refinitiv Developer Community - which explains how to monitor the connection state and also EMA Webinar Nov 2: How are connection events handled (disconnections, buffer overflows, etc) - Forum | Refinitiv Developer Community

if you want to know the state of connectivity to a server within the application, you can manually register for the Login Domain stream.

Please refer to the 330__Login__Streaming example that comes with the SDK.

So, for example, if the DataState of your Login stream changes to Suspect, you know something is not right - but as long as the StreamState remains open - this should recover to DataState of OK. If however, it has not recovered after a while, you could try and reconnect.

OR, If the StreamState changes to Closed, then this indicates that the application has been logged out of the server and you would need to reconnect.


icon clock
10 |1500

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

Thanks nalla !

I will forward this to client and let them try.

Also, client want to know the root cause why bellow ERROR happen. Could you advise ?

thanks

2022-05-18T01:16:48,557 ERROR 527112 [pool-14-thread-1] ItemCallbackClient 1864 processStatusMsg - loggerMsg

ClientName: ItemCallbackClient

Severity: Error

Text: Received an item event with invalid message stream

Instance Name EmaConsumer_1

RsslReactor 4139a51


loggerMsgEnd


2022-05-18T01:16:48,557 ERROR 527112 [pool-14-thread-1] ChannelCallbackClient 514 reactorChannelEventCallback - loggerMsg

ClientName: ChannelCallbackClient

Severity: Error

Text: Received ChannelDown event on channel Channel

Instance Name EmaConsumer_1

RsslReactor @6a550429

RsslChannel @228a92f4

Error Id -1

Internal sysError 0

Error Location WlItemHandler.dispatch

Error text ReactorCallbackReturnCodes.FAILURE was returned from defaultMsgCallback(). This caused the Reactor to shutdown.

loggerMsgEnd

Upvotes
1 0 0 0

Since we added StreamState into monitoring, we got so many StatusMsgs with StreamState[CLOSED] as below

2022-05-18T15:20:33,874 ERROR 23600 [pool-5-thread-1] EmaClient 53 onStatusMsg - StreamState[CLOSED] in StatusMsg
    streamId="7"
    domain="MarketPrice Domain"
    state="Closed / Ok / None / 'Stream closed for batch'"
    serviceName="ELEKTRON_DD"
StatusMsgEnd

2022-05-18T15:20:33,883 ERROR 23609 [pool-5-thread-1] EmaClient 53 onStatusMsg - StreamState[CLOSED] in StatusMsg
    streamId="9"
    domain="MarketPrice Domain"
    state="Closed / Ok / None / 'Stream closed for batch'"
    serviceName="ELEKTRON_DD"
StatusMsgEnd

...

While subscribing to Chain of LSE : [0#LSE-ALL] and Chain of SGX : [0#A.SI, 0#B.SI, 0#C.SI, 0#D.SI, 0#E.SI, 0#F.SI, 0#G.SI, 0#H.SI, 0#I.SI, 0#J.SI, 0#K.SI, 0#L.SI, 0#M.SI, 0#N.SI, 0#O.SI, 0#P.SI, 0#Q.SI, 0#R.SI, 0#S.SI, 0#T.SI, 0#U.SI, 0#V.SI, 0#W.SI, 0#X.SI, 0#Y.SI, 0#Z.SI]


We wonder if it is normal and what could be the possible reasons for this...

icon clock
10 |1500

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

Hello @ancoder

The close status message with "Stream closed for batch" text is expected behavior when the application subscribes a batch request to Refinitiv Real-Time.


The state "Closed / Ok / None / 'Stream closed for batch'" in a Status Message is to notify the application that the batch stream is closed. The application receives this Status Message after EMA has requested data for all RICs in the batch request already so the batch stream is not used anymore. The reason is the responses (data, status message) of all RICs are provided on individual streams which are not batch streams.

Hope this help.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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