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 epfeuffer · Jun 09, 2020 at 02:19 PM · ema c++

Dead lock in OmmConsumer ?

Hi i'm subscribing to symbols with the following type of code

consumer.registerClient(                                    
    ReqMsg()                                                  
      // default subscription domain is MMT_MARKET_PRICE      
      .serviceName( "ELEKTRON_AD" )                           
      .name( "IBM.N" ),                                       
    client );

at the same time i'm receiving data. Is the Ema C++ interface threadsafe? Can i subscribe

symbols while receiving data? Are there any precautions i should take to ensure there's no

deadlock condition? I"m receiving updates in the derived class


class AppClient : public thomsonreuters::ema::access::OmmConsumerClient

just like the example

Thanks

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.

7 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by zoya.farberov · Jun 09, 2020 at 08:38 PM

Hi @epfeuffer,

Suggest you print the value, before casting it into double. If it's not a double, for example, if it's a blank, you can not cast double out of it.

Guessing here, but I think what is stopping you is blanks.

Please see this previous discussion

Let us know if this helps?

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 zoya.farberov · Jun 09, 2020 at 02:48 PM

Hello @epfeuffer,

EMA API is thread-safe. Please see EMA C++ API Concepts Guide -> API Features section.

Yes, one can add and remove subscriptions while subscribing to data.

In terms of the best practices while achieving very high performance with EMA C++, it may be helpful to review Perf Consumer threaded example. It can be found in Elektron C++ SDK, in EMA\Examples\PerfTools\EmaCppConsPerf.

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 epfeuffer · Jun 09, 2020 at 02:59 PM

Thank you for the fast reply. the call to reg hangs and never comes back. how should i interpret that?

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 zoya.farberov · Jun 09, 2020 at 03:15 PM

Hello @epfeuffer,

I would start with a question, in order to understand exactly what you observe.

Have you tested with our standard examples and tutorials for EMA C++, do they run for you?

Quickstart guide, select for your infra connectivity

EMA C++ Consumer Tutorials

Is the issue limited to the newly written custom consumer?


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 epfeuffer · Jun 09, 2020 at 07:30 PM

Hi i'm connected and receiving data, able to subscribe while receiving data, which is good, but i've determined the sticking point. using the function fe.getReal().getAsDouble() causes the code to halt, if i exclude this function, all works fine. Is this function using a static buffer or something that's not re-entrant?

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 epfeuffer · Jun 09, 2020 at 08:43 PM

ok, i'll try that.. is there a class reference ? does the code throw and exception or just hang?

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 zoya.farberov · Jun 09, 2020 at 09:06 PM

Here is the link to EMA Reference Guide , click where is says "Click Here To Launch".

You should be able to, if this is what is happening, check for blanks prior as in the discussion above, or catch the Exception. Usually, the first approach is preferred.

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 Issue with update items

EMA C++ - How to implement a provider accepting post requests

[EMA C++] Can registerClient() & onRefreshMsg() run in different thread?

Is there a total count limit of quote for TREP?

how do i add EMAconfig in ema c++ and use it?

  • 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