|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Equivakent of get method of MQBaseJava in JMS |
« View previous topic :: View next topic » |
Author |
Message
|
murali_bestha |
Posted: Wed Feb 18, 2004 5:00 pm Post subject: Equivakent of get method of MQBaseJava in JMS |
|
|
Novice
Joined: 12 Feb 2004 Posts: 17
|
Hi,
Im MQBaseJava API, after accessing the queue, the get method removes the message from the queue. This way I can get the current depth of the Queue and get the messages in a loop. Is there any equivalent for this implementaiton in JMS? My requirement is, poll the Queue in intervals and get all the messages that are available in the Queue.
In case of JMS, message browsing doesnt remove the messages in Queue.
Please let me know.
Regards
Murali |
|
Back to top |
|
 |
EddieA |
Posted: Wed Feb 18, 2004 5:56 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Don't use the Browse versions then.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
murali_bestha |
Posted: Wed Feb 18, 2004 6:07 pm Post subject: |
|
|
Novice
Joined: 12 Feb 2004 Posts: 17
|
Thanks EddieA for the reply.
If not browse versions, then what versions can we use?
Our requirement is there will be a thread (doesnt implement the MessageListener) continuosly polling at the Queue, fetch the messages from it, process each message in a transaction. If there is an error during the transaction then the message has to be put back. Else message will be removed from the queue. And the thread sleeps for a few seconds and again polls the Queue.
I used Receiver's receiveNoWait() method, but it is not working un less it is used in a listener. So I tried to use Browser. But browser does not remove the messages from the queue once they are processed.
Please let me know how to use the receiver/browser for my requirement?
Thanks and Regards
Murali
EddieA wrote: |
Don't use the Browse versions then.
Cheers, |
|
|
Back to top |
|
 |
bower5932 |
Posted: Thu Feb 19, 2004 6:19 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I've never seen receive not work?
It sounds like you want to create a transacted session and then explicity call the commit() and rollback() methods depending on whether things worked or not. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|