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 » getting many messages at once from QueueReceiver()

Post new topic  Reply to topic
 getting many messages at once from QueueReceiver() « View previous topic :: View next topic » 
Author Message
gavon stone
PostPosted: Thu Mar 10, 2005 1:44 pm    Post subject: getting many messages at once from QueueReceiver() Reply with quote

Novice

Joined: 09 Mar 2005
Posts: 16

I am using a selector to select certain messages in a queue based on a property. The selection will return many messages, does anyone know how will I be able to acess all those messages. Currently I have seen in the documentation how to get one msg from a single receive() eg-
msg = (BytesMessage) queueReceiver.receive(3000);

but when I use a selector that will return many messages I am not sure what the API has to say on where all those messages will be placed.


Note : I am not using a publish/subscribe and I am using JMS with websphere MQ v5.3

Thanks
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu Mar 10, 2005 2:09 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

If I understand your question, you have to keep issuing the receive to get the rest of the messages. Or, you can set up an asynchronous message listener (onMessage) and it will get them asynchronously. There are a couple of programs at:

http://www.developer.ibm.com/tech/sampmq.html

They are mqjmsusr.java (puts messages) and mqjmssel.java (gets messages based on selector). They might help you out.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » getting many messages at once from QueueReceiver()
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.