I would like to see messages that EMAJ sends and receives. How to enable tracing to see these?
I would like to see messages that EMAJ sends and receives. How to enable tracing to see these?
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(); }
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>