question

Upvotes
Accepted
1 0 1 1

chain subsription

How can we differentiate RIC chain and RIC with actual market data. (I am trying to implement one consumer client for Chain decoding and the other client to handle actual data).

I am using java ema API to build consumer application. Example chains that i am subscribing (0#/FINRCORPORATE, 0#/FINRAGENCY)

And also can you let me know when do we get below errors..

Service State: Open / Suspect / None / 'channel down.'

Service State: Open / Suspect / None / 'Request timeout'

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-apijava
icon clock
10 |1500

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

Upvotes
Accepted
9.5k 10 5 7

Hello @ranga.gugulothu

You can differentiate RIC chain and RIC by looking for a specific field named the REF_COUNT field(field id 239) within the response message. The REF_COUNT field specifies how many elements are listed in the RIC Chain regardless of the template type as shown below:

For more details of the RIC Chain, please refer to the Simple Chain objects for EMA - Part 1

Regarding Service State: Open / Suspect / None / 'Request timeout', EMA generates this message when it does not receives any response back for a RIC request from the server within RequestTimeout parameter(default is 15,000 milliseconds or 15 seconds). I suggest you increase the RequestTimeout parameter to fit your environment.

For example: to set the timeout to be 300,000 milliseconds or 5 minutes:

<Consumer> 
	<Name value="Consumer_1"/> 
        … 
        <XmlTraceToStdout value="1"/> 
        <RequestTimeout value="300000"/> 
</Consumer> 

One way to find out the proper timeout for your environment is to set RequestTimeout to be 0. Then, EMA waits for a response indefinitely. Next, you can see in EMA XML trace log written on the console(set from XmlTraceToStdout=1 as shown above) when the request is sent and when the response(refresh) is received.

For the error: Service State: Open / Suspect / None / 'channel down.' It differs from the subject(chain subscription) /the original question(how to question to check RIC chain). It requires more info e.g. the whole log messages when the error occur, require more investigation and discussion to find out the real root cause of this error. Hence, I suggest you post this error as a separate question with more info. This will allows everyone can see the question obviously and can post the answers to help you accordingly.


icon clock
10 |1500

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

Upvotes
1 0 1 1

@Pimchaya.Wongrukun Thanks for the quick response. The link you have provided helped me in understanding chains. But I am trying to access data for these two master rics TRACEBTDS.FINR & TRACEATDS.FINR and looks like these are not chains. May i know how can i subscribe these two RIC's to fetch the tarce data.

icon clock
10 |1500

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

Upvotes
9.5k 10 5 7

Hello @ranga.gugulothu

To subscribe to a RIC, EMA provides the method registerClient(…) of OmmConsumer class. The method can subscribe the RIC regardless of its domain types e.g. Market Price(i.e. your master RICs and your chain RICs), Market by Price, Market by Order, Market Maker. For more details of each domain type, please refer to [Elektron_SDK_Java_Package]\Java\Ema\Docs\EMAJ_RDMUsageGuide.pdf

The example snipped source code to subscribe to the master RICs TRACEBTDS.FINR and TRACEATDS.FINR to the service named ELEKTRON:

consumer.registerClient(EmaFactory.createReqMsg().serviceName("ELEKTRON").name("TRACEBTDS.FINR"), appClient); 
consumer.registerClient(EmaFactory.createReqMsg().serviceName("ELEKTRON").name("TRACEATDS.FINR"), appClient); 

The default domain type of registerClient(…) is Market Price which is the domain type of your master RICs. Hence, you do not need to specify the domain type in the method. For more details of registerClient(..) method, please refer to [Elektron_SDK_Java_Package]/Java/Ema/Docs/refman/emajava/com/thomsonreuters/ema/access/OmmConsumer.html

I suggest you use example200__MarketPrice__Streaming Consumer application. The application demonstrates how to access Market Price data, decode each field according to its type. Please replace consumer.registerClient(…) in the application with the two lines above. Modify .serviceName(..), .host(…).username(…) to be your service, host and username respectively. The example result when I run the application to subscribe to your master RICs:

Item Name: TRACEBTDS.FINR
Service Name: API_ELEKTRON_EPD_RSSL
Item State: Open / Ok / None / 'All is well'
Fid: 1 Name = PROD_PERM DataType: UInt Value: 5611
Fid: 2 Name = RDNDISPLAY DataType: UInt Value: 152
Fid: 3 Name = DSPLY_NAME DataType: Rmtes Value: CBA
…
Item Name: TRACEATDS.FINR
Service Name: API_ELEKTRON_EPD_RSSL
Item State: Open / Ok / None / 'All is well'
Fid: 1 Name = PROD_PERM DataType: UInt Value: 5928
Fid: 2 Name = RDNDISPLAY DataType: UInt Value: 152
Fid: 3 Name = DSPLY_NAME DataType: Rmtes Value: Freddie Mac

Your chain RICs is Market Price domain so you can use example200__MarketPrice__Streaming to subscribe to them as well.

To understand developing EMA Java Consumer application clearly, I recommend you lean this from EMA Consumer section in Elektron SDK - Java Tutorials

icon clock
10 |1500

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

can you please tell where can i find this example example200_MarketPrice_Streaming

Hello @ranga.gugulothu ,

example200_MarketPrice_Streaming is part of Elektron SDK examples.

One can download the SDK from Downloads tab:

The examples are either consumer or provider, and are partitioned into sections in order of increasing complexity:

100s are the simplest, 200s are more complex, with 400 section containing the most advanced of the SDK examples.

The path to this specific example within SDK is:

Elektron-SDK1.2.0.java.rrg\

Java\Ema\Examples\src\main\java\com\thomsonreuters\ema\examples\training\

consumer\series200\example200__MarketPrice__Streaming

Hi Zoya... Thanks for responding,it was helpful to start with my project and I made some progress. I need to know FID number to identify trade type like "TRADE, TRADE_CANCEL, TRADE_CORRECTION, PRIOR_DAY_TRADE, PRIOR_DAY_TRADE_CANCEL, PRIOR_DAY_TRADE_CORRECTION, TRADE_NON_REGULAR". I think we call it as trade events, if yes i need FID number to identify these events.

Show more comments
Show more comments
Click below to post an Idea Post Idea