Products | Versions |
---|---|
TIBCO Enterprise Message Service | - |
Not Applicable | - |
Resolution:
Description:
===========
EMS does not print the bodies of Byte messages in the server log. You can use monitoring topics to obtain the bodies of Byte messages. If the body is actual text, you can convert it to string.
Resolution:
============
Example: Include the following in tibjmsTopicSubscriber.java (under <ems_home>/samples/java):
javax.jms.MapMessage message = (MapMessage)subscriber.receive();
byte[] mb = message.getBytes("message_bytes");
javax.jms.BytesMessage mm = (javax.jms.BytesMessage)com.tibco.tibjms.Tibjms.createFromBytes(mb);
int l = (int)mm.getBodyLength();
byte[] body = new byte[l-1];
mm.readBytes(body);
If it is text:
System.out.println("Received message: "+ new String(body));
Then run:
java tibjmsTopicSubscriber -topic $sys.monitor.T.*.topic.sample
Platforms:
=============
All
Keywords:
============
BytesMessage createFromBytes monitoring topics