Posted: Thu Mar 10, 2005 1:44 pm Post subject: getting many messages at once from QueueReceiver()
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
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:
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