question

Upvotes
Accepted
1 0 0 0

EMA J - RTO reconnect

Good afternoon,

I am building an AWS client based on EMA J 3.7.3.0, specifically consumer113 (example code). The application is connecting to the RTO service. Both my code and Refinitiv's consumer113 have been experiencing trouble
1. Making an initial connection - quitting after 45000 milliseconds/5 attempts
2. Staying connected more than 15 minutes, after which there is not attempt to reconnect.
3. I was led to believe by Refinitiv technical staff that EMA J ensured automatic-reconnections but I can now see this is not the case and I will have to build logic to address this (maybe consumer113 is too basic)?

I have done some digging around the forums and found references to a thread that has to be run to keep the connection up.

Could you please advise and help? Thank you!

#technologyema-apirefinitiv-realtime-sdkrefinitiv-real-time
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
81.1k 264 53 76

@test03

Thank you for reaching out to us.

You need to test it on the local environment to make sure it can run properly on the local environment. It should be the network policies on AWS.

Then, please check the version of authentication (v1 or v2) that you are using by refering to this article.

If you are using the v1 authentication, the v1 credentials can't be used concurrently with other applictions.

You can also enable trace logging in the EMA to verify what the problem. To enable logging, please refer to the Learn how to direct EMA Java log to Java Logging API article.

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
1 0 0 1

Thank you Jirapongse. I turned on full-logging but the mystery persisted. In the end the issue was the length of the sleep the thread during which all the action happens. It was timed to 15 minutes. The thread sleeps while the main consumer reacts to messages from the server. I put a Thread.sleep(60000) (1 minute) in an infinite loop at the bottom of main(...) - while (true) { Thread.sleep(60000) } . I suppose I could have lengthened the sleep time. Maybe longer is better? This comes from from Gurpreet's answer here https://community.developers.refinitiv.com/questions/21086/data-streaming-auto-logout-login-stream-was-closed.html

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.

The while (true) { Thread.sleep(60000) } is enough to verify if the application can connect to the server.


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.