ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Reading JMS messages using MQ API

Post new topic  Reply to topic
 Reading JMS messages using MQ API « View previous topic :: View next topic » 
Author Message
fanningpj
PostPosted: Mon Jul 01, 2002 12:59 am    Post subject: Reading JMS messages using MQ API Reply with quote

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.

Thanks in advance,
PJ
Back to top
View user's profile Send private message Visit poster's website
fanningpj
PostPosted: Mon Jul 01, 2002 1:27 am    Post subject: I'm a dummy Reply with quote

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'.
Code:

InitCtx> def q(default) qu(default) targclient(MQ)
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Reading JMS messages using MQ API
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.