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 » How to Receive message with Message ID from JMS

Post new topic  Reply to topic
 How to Receive message with Message ID from JMS « View previous topic :: View next topic » 
Author Message
balareddy
PostPosted: Thu Mar 02, 2006 8:33 pm    Post subject: How to Receive message with Message ID from JMS Reply with quote

Acolyte

Joined: 06 Feb 2006
Posts: 54

Hi,

How to receive JMS mesage from the Queue by using message ID as parameter??

my application iplimentation is like this.

I have an Applet View to display all Queue message with QueueBrowse functionality.
Now From Applet View, i have to select one message and click on "post" buttion. This time i have to get that perticular selected message and put into Some other Queue .

Same Way i have to do some other operations on each message like Delete,..

In this case i have to Get message from Queue based on message ID only Right???
_________________
bala
Back to top
View user's profile Send private message AIM Address
briancop
PostPosted: Fri Mar 03, 2006 3:24 am    Post subject: Using a selector Reply with quote

Apprentice

Joined: 04 Apr 2005
Posts: 28
Location: Hursley, UK

One way to achieve what you want is to specify a selector when you create your message consumer, specifying the JMSMessageID that you are trying to get. Note that this would imply creating a new message consumer for each message, though (in MQ terms, MQOPEN, MQGET, MQCLOSE).

So your actions on clicking a button are something like:
Cons = Session.createMessageConsumer, with selector "JMSMessageID = <id>"
Msg = Cons.receive
Cons.close
...deal with Msg...
Back to top
View user's profile Send private message
wschutz
PostPosted: Fri Mar 03, 2006 3:35 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Andi, if you prepend your selector value with "ID:", (without the quotes), then an efficient MQGET with that selector will be done
(see the discussion here:
http://www.mqseries.net/phpBB2/viewtopic.php?t=27403&highlight=
)
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » How to Receive message with Message ID from JMS
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.