Posted: Mon Jul 01, 2002 12:59 am Post subject: Reading JMS messages using MQ API
Newbie
Joined: 03 Dec 2001 Posts: 7
I have a scenario whereby messages will be enqueued using the JMS API but they will be dequeued using MQ's proprietary API. The JMS headers seem to included in the body of the message. I use code like the following:
Code:
MQMessage retrievedMessage = new MQMessage();
queue.get(retrievedMessage, new MQGetMessageOptions());
String message = retrievedMessage.readString
(retrievedMessage.getMessageLength());
The original message was a javax.jms.TextMessage but when re-read using the code above, the message string includes lots of control characters and the JMS headers in an XML-like format.
My question is if there is a way to suppress the headers in JMS or on the MQ side to ignore them? Any help would be appreciated.
Posted: Mon Jul 01, 2002 1:27 am Post subject: I'm a dummy
Newbie
Joined: 03 Dec 2001 Posts: 7
I already asked a similar question on this forum a couple of months ago. The best approach is, in the JMSAdmin tool, to define the queue with a targclient value of 'MQ' - the default is 'JMS'.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum