Springboot REST API using EMA

was looking for examples of how to develop a springboot REST API using the EMA API. Any good references ? using the following version
implementation("com.refinitiv.ema:ema:3.8.3.0")
Answers
-
Hello @quotes-support
There is an article How to build a scalable web service for stock prices that uses EMA API + deployed RTDS + Springboot to create REST API application. The example source code link is available on the article page.
The example of the same Springboot app that has been modified to consume data from RTO is available on GitHub https://github.com/LSEG-API-Samples/Article.EMA.Java.RTO.Azure repo.
1 -
thank you for responding. You mentioned RTO, will this example also work for RTMDS ?
0 -
Hello @quotes-support
If you are using RTMDS, please see the deployed RTDS version on this
article (the GitHub link is available on the article).The RTMDS is basically the RTDS components deployed on LSEG hosted infra, so the connection and code are the same as the deployed RTDS (you need Server IP Address, RSSL Port, DACS Username, Service name).
The RTO is RTDS hosted on AWS cloud. It requires different credential and connection code than the RTMDS/RTDS.
0 -
Getting login exception. Have provided the correct information for our RTMDS . Please help.
[WARN]~2025-06-07-14.44.11.532CDT~~~~~~ o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext Exception encountered during context initialization - cancelling refresh attempt: Exception Type='OmmInvalidUsageException', Text='login failed (timed out after waiting 45000 milliseconds) for ip.of.our.RTMDS.SERVER:14002)', Error Code='-4052'
[INFO]~2025-06-07-14.44.11.548CDT~~~~~~ o.a.c.h.Http11NioProtocol Stopping ProtocolHandler ["http-nio-8080"]
[INFO]~2025-06-07-14.44.12.325CDT~~~~~~ o.a.c.c.StandardService Stopping service [Tomcat]
[WARN]~2025-06-07-14.44.12.334CDT~~~~~~ o.a.c.l.WebappClassLoaderBase The web application [ROOT] appears to have started a thread named [idle-connection-evictor-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.base@17 .0.12/java.lang.Thread.sleep(Native Method)
java.base@17 .0.12/java.lang.Thread.sleep(Thread.java:346)
java.base@17 .0.12/java.util.concurrent.TimeUnit.sleep(TimeUnit.java:446)
app//org.apache.hc.core5.util.TimeValue.sleep(TimeValue.java:383)
app//org.apache.hc.client5.http.impl.IdleConnectionEvictor.lambda$new$0(IdleConnectionEvictor.java:60)
app//org.apache.hc.client5.http.impl.IdleConnectionEvictor$$Lambda$1228/0x0000021a0171a210.run(Unknown Source)
java.base@17 .0.12/java.lang.Thread.run(Thread.java:842)
[INFO]~2025-06-07-14.44.12.340CDT~~~~~~ o.s.b.a.l.ConditionEvaluationReportLoggerError starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
[ERROR]~2025-06-07-14.44.12.370CDT~~~~~~ o.s.b.SpringApplication Application run failed com.refinitiv.ema.access.OmmInvalidUsageExceptionImpl: login failed (timed out after waiting 45000 milliseconds) for 146.242.129.66:14002)
at com.refinitiv.ema.access.OmmBaseImpl.ommIUExcept(OmmBaseImpl.java:2099)
at com.refinitiv.ema.access.OmmBaseImpl.handleLoginReqTimeout(OmmBaseImpl.java:1886)
at com.refinitiv.ema.access.OmmConsumerImpl.handleAdminDomains(OmmConsumerImpl.java:679)
at com.refinitiv.ema.access.OmmBaseImpl.initialize(OmmBaseImpl.java:368)0 -
Is there anyway to get in touch with the author of the article - Gurpreet Bal ?
0 -
Also what kind of response times can we expect from the getQuote endpoint with the example shown here - https://community.developers.refinitiv.com/home/leaving?allowTrusted=1&target=https%3A%2F%2Fdevelopers.lseg.com%2Fen%2Farticle-catalog%2Farticle%2Fscalable-web-service-for-stock
0 -
Hello @quotes-support
I found the log message.
login failed (timed out after waiting 45000 milliseconds) for ip.of.our.RTMDS.SERVER:14002)', Error Code='-4052
This log means the API did send a Login request message to RTMDS but it did not get any login response message back on time until it reaches timeout (45 seconds). This is most likely a network issue between your machine and RTMDS.
- Can you telnet or ping to that RTMDS from the same application machine?
- Can you replicate the issue with the ex100_MP_Streaming example connect to the same RTMDS?
You may try to increase value of the LoginRequestTimeOut parameter on the EmaConfig.xml file.
If increasing the LoginRequestTimeOut parameter does not help, or you cannot telnet/ping to that RTMDS, or you encounter the same login timeout problem with the ex100_MP_Streaming example, I strongly suggest you contact the RTMDS support team.
You can contact the team via https://support.lseg.com/ website.
About the getQuote endpoint question, that getQuote is an application created HTTP service which is based on how fast the EMA receives data from the server. You might need to contact the RTMDS team about their response time.
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
- 687 Datastream
- 1.4K DSS
- 623 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 557 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 276 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 690 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
- 105 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 91 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛