EMA ReconnectAttemptLimit

I am using Consumer app in example from EMA. Everything is fine and I have an infinite loop and let the callback handle refresh and update messages.
The issue is when the upstream disconnects the EMA tries to reconnect until ReconnectAttemptLimit is reached and stops trying again which is expected. However due to my infinite loop to let the app run forever, I am in situation where I do not know if the EMA is retrying or the ReconnectAttemptLimit is reached and will not retry to connect. Is there any way for me to see if the ReconnectAttemptLimit is reached?
I see that the Ema log shows Severity as Warning when it tries to reconnect and as Error when the retry limit is reached.
loggerMsg
TimeStamp: 10:54:25.573
ClientName: ChannelCallbackClient
Severity: Warning
Text: Received ChannelDownReconnecting event on channel Channel_1
Instance Name Consumer_1_1
RsslReactor 0x0x153ebe0
RsslChannel 0x0x153e3c0
Error Id -1
Internal sysError 107
Error Location /local/jenkins/workspace/ESDKCore_RCDEV/OS/RH8-64/rcdev/source/rtsdk/Cpp-C/Eta/Impl/Reactor/rsslReactorWorker.c:1480
Error Text </local/jenkins/workspace/ESDKCore_RCDEV/OS/RH8-64/rcdev/source/rtsdk/Cpp-C/Eta/Impl/Transport/rsslSocketTransportImpl.c:6115> Error: 1002 ipcConnecting() client connect() failed. System errno: (107)
loggerMsgEnd
loggerMsg
TimeStamp: 10:54:33.627
ClientName: ChannelCallbackClient
Severity: Error
Text: Received ChannelDown event on channel Channel_1
Instance Name Consumer_1_1
RsslReactor 0x0x153ebe0
RsslChannel 0x0x1539aa0
Error Id -1
Internal sysError 107
Error Location /local/jenkins/workspace/ESDKCore_RCDEV/OS/RH8-64/rcdev/source/rtsdk/Cpp-C/Eta/Impl/Reactor/rsslReactorWorker.c:1480
Error Text </local/jenkins/workspace/ESDKCore_RCDEV/OS/RH8-64/rcdev/source/rtsdk/Cpp-C/Eta/Impl/Transport/rsslSocketTransportImpl.c:6115> Error: 1002 ipcConnecting() client connect() failed. System errno: (107)
loggerMsgEnd
Through debug I can see when the retry limit is reached the channel is put into delete list but as OmmConsumer, I do not have any way to access that list since it is private. Any help please on figuring out if the EMA has reached reconnect attempt and will not try to reconnect?
Best Answer
-
Hi @vishal.anand,
The default value for Reconnect attempt is -1, which implies that the API will keep on trying to connect until successful. This would be a logical setup for most consumer applications.
Is there a reason you changed it, considering that your application is in an infinite loop.
0
Answers
-
Hello @vishal.anand ,
Is the application registering a status callback and processing the information as received? Do you observe status with State = " ... channel down"? That would be an indication that the connection is down.
Please also refer to this previous discussion thread and this previous discussion thread for additional information about handling disconnects at the API level.
0 -
The Reconnect attempt is -1 and yes if it disconnects after connection was successfully, it keeps retrying.
I am talking about the 1st time trying to connect and can't. It exits after 5 tries throwing an exception. Is there a parameter to increase this tries at startup?
Exception Type='OmmInvalidUsageException', Text='login failed (timed out after waiting 45000 milliseconds)', ErrorCode='-4052'
0 -
I just want to increase number of times the client app tries to connect at startup (meaning 1st time trying to connect).
0 -
Hello @vishal.anand
The EMA API does not expose the configuration to change the number of times the API attempt to reconnect for the initial connection (the 1st time trying to connect).
About the "Exception Type='OmmInvalidUsageException', Text='login failed (timed out after waiting 45000 milliseconds)', ErrorCode='-4052' " exception message, the application can increase the login timeout value via the LoginRequestTimeOut configuration parameter.
I did a quick test with the <LoginRequestTimeOut value="180000"/> configuration and connects to the unavailable server (to simulate the first connection), the API tries to connect to that server for 3 minutes before stopping retry.
0 -
Ok, this is not what you asked in your question. Initial connection attempts are different from reconnection attempts and the parameter ReconnectAttemptLimit does not play any role in it. There is a different parameter - LoginRequestTimeOut for that.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 690 Datastream
- 1.4K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 559 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 280 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 719 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛