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 Chaitanya.Vishnubhotla · May 31, 2017 at 05:57 AM · exception

In com.thomsonreuters.ema.examples.training.consumer.series100.example130__MarketPrice__UserDisp - consumer.java class

People who like this

0 Show 2
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.

avatar image
Chaitanya.Vishnubhotla · May 31, 2017 at 05:59 AM 0
Share

In com.thomsonreuters.ema.examples.training.consumer.series100.example130__MarketPrice__UserDisp - consumer.java class
we have a line consumer = EmaFactory.createOmmConsumer(EmaFactory.createOmmConsumerConfig().operationModel(OperationModel.USER_DISPATCH).host("10.72.78.42:14002").username("721001"));
which gives an exception when either server and host or userid is wrong after 45 seconds. Can the error response can be made faster i.e., not to wait for 45 seconds as our code tries to connect
for four servers which comes nearly to 3 minutes.

avatar image
Chaitanya.Vishnubhotla · May 31, 2017 at 05:59 AM 0
Share

Also, is there any way to API throws a specific error like Userid submitted is not a valid one.

7 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by umer.nalla · Jun 01, 2017 at 05:26 AM

Hi @Chaitanya.Vishnubhotla

Please refer to the EMA ConfigGuide.pdf for details of the various timeout parameters.

The LoginTimeoutRequest Parameter which is set at the Consumer config level will allow you to control how long EMA waits for a Login Response.

<Consumer>
	<!-- Name is mandatory	-->
	<Name value="Consumer_1"/>
	<!-- Channel is optional: defaulted to "RSSL_SOCKET + localhost + 14002"-->
	<!-- Channel or ChannelSet may be specified-->
	<Channel value="Channel_1"/>
	<!-- Dictionary is optional: defaulted to "ChannelDictionary"-->
	<Dictionary value="Dictionary_1"/>
	<LoginRequestTimeOut value="5000"/>
</Consumer>

So, above I have specified 5 seconds timeout.

Also, please refer to the following post on how to capture Invalid Login scenario:

How to interpret Login messages for invalid user for Java EMA api

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
Answer by Chaitanya.Vishnubhotla · Jun 05, 2017 at 02:43 AM

Hi

Thanks for your reply. I was able to reduce the timeout. But I am still not able to get any string like User id is not valid when I am trying to print the statusmsg.state()

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 umer.nalla · Jun 05, 2017 at 05:54 AM

Hi @Chaitanya.Vishnubhotla

Have you implemented the Login handler code from example330__Login__Streaming as mentioned in the other post I linked above?

What exactly do you see in the StatusMsg ?

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
Answer by Chaitanya.Vishnubhotla · Jun 05, 2017 at 06:12 AM

Hi @Umer Nalla,

Nothing is getting printed in the method onstatusmsg()
Kindly, please let me know how to get the line

State: State: Closed/Suspect/User unknown to permissioning system, it could be DACS, AAA or EED - text: "721001, unknown to system

programmatically.

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 umer.nalla · Jun 05, 2017 at 06:34 AM

Hi @Chaitanya.Vishnubhotla

I just tried the steps from the linked post and I got the following output to the console from the OnStatusMsg handler:

Received Status. Item Handle: 1 Closure: null
Item Name: user
Service Name: <not set>
Item State: Closed / Suspect / User unknown to permissioning system, it could be DACS, AAA or EED / 'user, unknown to system.'

Are you sure you are following all the steps mentioned in the above post - specifically the following post by Wasin Waeosri?

Could you please re-test the scenario with EMA Java 1.1.0 (Elektron SDK 3.1.0) which is the latest version? This version has fixed the "Consumer application does not receive denied login message/event" issue. You can use the EMA Java example330__Login__Streaming to verify the issue.

If you study the example code for example 330 you will notice that it specifies the ConsumerClient instance appClient to receive callbacks when creating the OmmConsumer

consumer  = EmaFactory.createOmmConsumer(EmaFactory.createOmmConsumerConfig().host("10.13.234.56:14002").username("user"), appClient);

As you may know, the login is performed behind the scenes by EMA when the above line of code is executed - i.e. EMA tries to connect to the server 10.13.234.56 on port 14002 using the DACS id of 'user'. Specifying appClient as the callback client results in the response from the Login being passed onto appClient included the any StatusMsg for a failed Login or a RefreshMsg for a Successful Login.

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
Answer by Chaitanya.Vishnubhotla · Jun 05, 2017 at 08:07 AM

Hi @Umer Nalla,

I am getting the below compilation error when I downloaded the latest version EMA1.1

The method createOmmConsumer(OmmConsumerConfig, OmmConsumerErrorClient) in the type EmaFactory is not applicable for the arguments (OmmConsumerConfig, AppClient) Consumer.java

Do I need to update any of my jars, please let me know

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 umer.nalla · Jun 05, 2017 at 12:02 PM

Hi @Chaitanya.Vishnubhotla

Each release of the API usually comes with its own set of jars. Please use the correct jars.

Certainly in this case, the error message suggests a mismatch in parameters between the example code & the method definition and as pointed out earlier there was a bug fix, so latest versions of the jars would be the 1st thing to try.

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 ChannelSet failover

EMA TRCC OmmMemoryExhaustionException

callback thread exception

ema sdk exception problem

Getting java.lang.NoSuchFieldError: INSTANCE exception on Apache layer while connecting using Keystore.

  • 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
  • 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