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 » Read a message by messageId

Post new topic  Reply to topic
 Read a message by messageId « View previous topic :: View next topic » 
Author Message
langrand
PostPosted: Fri Aug 31, 2007 6:47 am    Post subject: Read a message by messageId Reply with quote

Newbie

Joined: 31 Aug 2007
Posts: 7

Hi,

I would like to read a selected message in a queue. the selector is the MessageID.

I did it before but I select the message by the correlationID and i have no problems.
qReceiver = session.createReceiver(iQueue, "JMSCorrelationID=\'" + messageID + "\'");



So I think it was:
qReceiver = session.createReceiver(iQueue, "JMSMessageID: =\'" + messageID + "\'");

but I have this JMS Exception:
javax.jms.InvalidSelectorException: MQJMS0004

could someOn Help me

thanks a lot

best regards
Ludovic
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Aug 31, 2007 12:42 pm    Post subject: Re: Read a message by messageId Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

langrand wrote:

qReceiver = session.createReceiver(iQueue, "JMSMessageID: =\'" + messageID + "\'");
could someOne Help me

thanks a lot

best regards
Ludovic


qReceiver = session.createReceiver(iQueue, "JMSMessageID: =\'" + messageID + "\'");

Try:
qReceiver = session.createReceiver(iQueue, "JMSMessageID =\'" + messageID + "\'");

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
langrand
PostPosted: Sun Sep 02, 2007 10:41 pm    Post subject: Reply with quote

Newbie

Joined: 31 Aug 2007
Posts: 7

thanks a lot !!!

I think I never see this two point.

Every thing is Ok now.

thanks again.

Best regards

Ludovic
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Read a message by messageId
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.