Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Elektron /
  • EMA /
avatar image
Question by ning.kang · Oct 23, 2020 at 10:30 AM · ema javarefinitiv real-time sdk api

how to make EmaFactory to connect with the second host if the first host can not be connected

Hi, We are using the thomson-reuters-ema java api (version 3.5.1.0) to connect the EAM server. Recently we got a lot of errors like:


loggerMsg

ClientName: EmaConsumer_287

Severity: Error

Text: login failed (timed out after waiting 45000 milliseconds) for xxxxxxxx.europe.intranet:14002)

loggerMsgEnd


It turned out that a particular server was in maintenance. The others configured servers in hosts should be functioning. However, the EmaFactory is always trying to connect with the first host, and did not try the other hosts in the host list.


This log is generated by the EmaFactory, which cannot be modified by us. So the question is, how to let the EmaFactory only try once for the connection of each host? If it failed, then try another host? Currently it seems that the EmaFactory is always trying to connect with the first host in the host list.


Below is our code to connect to the EMA host, thanks.

--------------------------------------------------------------------

private OmmConsumer getOmmConsumer() {

OmmConsumer consumer;

for (String host : hosts) {

try {

LOGGER.debug("Start to connect with Trep Server: {} --- {}", host, user);

OmmConsumerConfig config = EmaFactory.createOmmConsumerConfig();

consumer = EmaFactory.createOmmConsumer(config.host(host).username(user).applicationId(APPLICATION_ID));

return consumer;

} catch (OmmException exception) {

LOGGER.warn(exception.getMessage());

}

}

return null;

}


People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by moragodkrit.chumsri_1 · Oct 24, 2020 at 02:35 AM

@ning.kang

OmmConsumerConfig.host(String) is to specify a hostname and port that EMA will connect to so it does not accept multiple hosts. You may need to use ChannelSet, as described in the following post instead.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by wasin.waeosri · Oct 26, 2020 at 06:14 AM

Hello @ning.kang

There is also the Enterprise Message API (EMA) - Configuration Overview article that will give you an explanation regarding EMA Config file. Please refer to "Channels and ChannelSets" section in the article.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
7 People are following this question.

Related Questions

EMA - Value decoding in log file

Hello, We are looking for single threaded example of synchronous processing, publishing a single message to a specific monitor/page using EMA Java SDK. Do we have any example of such?

NullPointerException from UpdateMsgImpl.toString

What are the parameters we have to pass for the below code consumer.registerClient(reqMsg.serviceName("DIRECT_FEED").name("IBM.N"), appClient);

Does the "ACVOL_1"(FID=32) indicate volume value?

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges