question

Upvote
Accepted
401 23 28 37

How to enable tracing incoming/outgoing messages EMA Java receives/sends

I would like to see messages that EMAJ sends and receives. How to enable tracing to see these?

refinitiv-realtimeelektronelektron-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.

Upvote
Accepted
25.4k 90 13 26

For xml tracing you need to use <XmlTraceToStdout value="1" /> in the EmaConfig.xml file under the Channel Config e.g.

		<Channel>
			<Name value="Channel_2"/>
			<ChannelType value="ChannelType::RSSL_SOCKET"/>
			<CompressionType value="CompressionType::None"/>
			<GuaranteedOutputBuffers value="5000"/>
			<Host value="122.1.1.100"/>
			<Port value="14002"/>
			<XmlTraceToStdout value="1" />
		</Channel>

You should then see the Incoming and Outgoing messages on the std out.

Obviously, you can redirect Std Out to a file using standard Java functionality e.g.

try { 
	System.setOut(new PrintStream(new BufferedOutputStream(new FileOutputStream("output.txt")))); 
} catch (FileNotFoundException e) 
{ 
	// TODO Auto-generated catch block e.printStackTrace(); 
}

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
9.6k 10 7 7

Make sure that the application loads the configuration from EmaConfig.xml. For example:

consumer = EmaFactory.createOmmConsumer(EmaFactory.createOmmConsumerConfig().consumerName("Consumer_2"));

The snipped configuration xml:

<ConsumerList>

<Consumer>

<Name value="Consumer_2"/>

<Channel value="Channel_2"/>

<Dictionary value="Dictionary_2"/>

</Consumer>

</ConsumerList>

<ChannelList>

<Channel>

<Name value="Channel_2"/>

<XmlTraceToStdout value="1"/>

<ChannelType value="ChannelType::RSSL_SOCKET"/>

<CompressionType value="CompressionType::None"/>

<GuaranteedOutputBuffers value="5000"/>

<Host value="adsserver"/>

<Port value="14002"/>

</Channel>

</ChannelList>

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.