We are using this lib:
WE need to monitor the status of the connection as it is working fine in UAT, but in PROD it seems to loose connectivity and we have no information from the lib why this is the case.
How can we monitor this?
@cees.beekhuis, Your EMA application should receive the status messages when the connection to ADS is lost. You can also enable various logging options to capture message logs in the EMA api. Refer to configuration guide within development guides.
The TREP/ADS has a monitoring console and logs, which should outline the reason for dropped connection. Most commonly, it is the slow consumer, i.e. a consumer which is not processing messages fast enough, causing buffer overruns.
Hope this helps.
Thank you for your response! What is the exact name of the development guide and what page number can I find the information for monitoring the status of a connection?
I clicked on your link and it shows me all the guides for EMA, but non of the guides is called 'configuration guide':
If you expand the section: Development and click on "Message API - C++ Development Guides", there will be a set of books, and one such book is called "EMA C++ Configuration Guide". The config guide will allow you to turn on the API message logging.
Realtime notifications on the state of connectivity to server will still happen through the API. See the example 333__Login__Streaming__DomainRep in the EMA examples which show how login stream can be used to monitor the state of connection.
The 333__Login__Streaming__DomainRepresentation showcases usage of login stream in OMM Consumer.
It demonstrates opening of login stream as well as its processing. Having
a login stream open is useful for consumer applications willing to do
Off Stream Posting and or knowing the state of its connectivity to server.
The string is for logging purposes. Refer to the ema.access.StatusMsg.state() which returns OMMState which has enumerations for Data, Stream and Status state.
This article provides insight into the item recovery and failover process, with an explanation of state messages.
@Gurpreet. Hi, I read your previous post but failed to receive callback message. My application connects to two nginx proxies which either redirect traffic to one trep server. First I shutdown proxy 1, and see such message via stdout
then sdk tried the second proxy and print connect succ message:
Then I shutdown the second proxy, receving such stdout message:
loggerMsg TimeStamp: 10:15:55.190 ClientName: ChannelCallbackClient Severity: Warning Text: Received ChannelDownReconnecting event on channel Channel_2 Instance Name Consumer_2_1 RsslReactor 0x0x1c5bc10 RsslChannel 0x0x1c5bc10 Error Id -1 Internal sysError 11 Error Location /opt/lxy/setup/Elektron-SDK1.2.1.linux.rrg/Cpp-C/Eta/Impl/Reactor/rsslReactor.c:3144 Error Text </opt/lxy/setup/Elektron-SDK1.2.1.linux.rrg/Cpp-C/Eta/Impl/Transport/rsslSocketTransportImpl.c:608> Error:1002 ipcRead() failure. Connection reset by peer loggerMsgEnd loggerMsg TimeStamp: 10:15:55.190 ClientName: LoginCallbackClient Severity: Warning Text: RDMLogin stream state was changed to suspect with status message username user4 usernameType 1 position 172.17.0.3/net appId 256 applicationName ADS instanceId <not set> singleOpen 1 allowSuspect 1 optimizedPauseResume 0 permissionExpressions 1 permissionProfile 0 supportBatchRequest 1 supportEnhancedSymbolList 1 supportPost 1 supportViewRequest 1 role 0 State: Open / Suspect / None / 'Channel is down.' loggerMsgEnd loggerMsg TimeStamp: 10:15:56.211 ClientName: ChannelCallbackClient Severity: Warning Text: Received ChannelDownReconnecting event on channel Channel_1 Instance Name Consumer_2_1 RsslReactor 0x0x1c5bc10 RsslChannel 0x0x1c5bc10Å Error Id -1 Internal sysError 107 Error Location /opt/lxy/setup/Elektron-SDK1.2.1.linux.rrg/Cpp-C/Eta/Impl/Reactor/rsslReactorWorker.c:676 Error Text </opt/lxy/setup/Elektron-SDK1.2.1.linux.rrg/Cpp-C/Eta/Impl/Transport/rsslSocketTransportImpl.c:5771> Error: 1002 ipcConnecting() client connect() failed. System errno: (107) loggerMsgEnd
The ipcConnecting() failure message continues until I start either of two proxies. But seen from my log, I found onStatusMsg() is not called, as I will print the message there. So my question is:
1) How can onStatusMsg() called back when connection to proxy/trep lost ?
2) Can I figure out which channel connection lost ? As my application connects to two proxies, if only one proxy lost connection, the app is still ok. But if two channels lost connection, I have to take my own action.
3) How to check if the callback statusMsg indicates connection lost or connection restablished succ?
Many thanks, expecting your reply.