question

Upvotes
Accepted
1 2 0 3

Can we use EMA Consumer example to read Ticket Output Feed?

What are the parameters we need to pass in the following code snippet?

What we are trying to read is complete deal info to java code,

<FS>332<US>tag<GS>TCID # INFO<FS>

consumer.registerClient( EmaFactory.createReqMsg() .serviceName("ELEKTRON_AD") .name("BB.TO"), eventHandler );

Can someone please help on this? Am looking for an example for Reading Ticket Output Feed. Please help

elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-apijava
icon clock
10 |1500

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

Hello @varma,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

Hello @varma,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

Upvotes
Accepted
78.9k 250 52 74

EMA Java can be used to retrieve real-time data from ELEKTRON service (ELEKTRON_AD). Please see the sample market price data for BB.TO in the attached file (data.txt). The data is in field list. I couldn't find Ticket Output Feed in the returned field list.

For Ticket Output Feed, it could be from Transaction Product, such as Dealing. <FS>332 is not used by real-time data.

You should contact your Thomson Reuters account team for further assistance regarding TOF or contact the Dealing support team via http://my.thomsonreuters.com/ContactUsNew


data.txt (5.1 KiB)
icon clock
10 |1500

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

Upvotes
25.3k 87 12 25

Hi @varma

Reading between the lines, I am guessing that you want code to subscribe to the DealTicket TCID#INFO record and then consume each new ticket that is issued on the Dealticket #INFO record.

Firstly, I recommend you work through the first few steps of our EMA Java tutorials - up to the step 'EMA Consumer - Parsing and Decoding MarketPrice data' - to get a basic understanding of how EMA Consumer works.

You will note in the tutorial that you call registerClient with the RIC that you wish to subsrcibe to.

OmmConsumerClient infoEventHandler = this;
consumer.registerClient(
                  EmaFactory.createReqMsg()
                                .serviceName("ELEKTRON_AD")
                                .name("TCID#INFO"), 
				 infoEventHandler );		

This will result in the OnRefreshMsg invoked initially and then OnUpdateMsg invoked as and when new DealTicket records are generated on TOF.

From the OnRefreshMsg and OnUpdateMsg you would then call the decode method which iterates through the FieldList and extracts the LATESTID field (as well as others you require). Each time you get a new LATESTID field you would then call registerClient again - using the LATESTID as the RIC code - but this time you would only want a snapshot - not a streaming request so you would set the interestAfterRefreshFlag to false

consumer.registerClient(
                  EmaFactory.createReqMsg()
                                .serviceName("ELEKTRON_AD")
                                .name(latestTicketID)
				.interestAfterRefresh(false), //snapshot
				 _ticketEventHandler );	

NOTE the following:

  • I am guessing the field that contains the new TICKET number is LATESTID - it could be a different Field
  • I have used ELEKTRON_AD as the servicename - yours may well be different e.g. DEALING_DATA?
  • Note that I am using two different OmmConsumerClient instances - each with its own implementation (not shown) - infoEventHandler and _ticketEventHandler
  • You could use the same OmmConsumerClient instance (and implementation) - but using one to implement the code for handling #INFO records and one to implement the code for handling your Ticket records will make the code cleaner.
icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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