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 » Equivakent of get method of MQBaseJava in JMS

Post new topic  Reply to topic
 Equivakent of get method of MQBaseJava in JMS « View previous topic :: View next topic » 
Author Message
murali_bestha
PostPosted: Wed Feb 18, 2004 5:00 pm    Post subject: Equivakent of get method of MQBaseJava in JMS Reply with quote

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
View user's profile Send private message Yahoo Messenger
EddieA
PostPosted: Wed Feb 18, 2004 5:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
murali_bestha
PostPosted: Wed Feb 18, 2004 6:07 pm    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
bower5932
PostPosted: Thu Feb 19, 2004 6:19 am    Post subject: Reply with quote

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
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 » Equivakent of get method of MQBaseJava in 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.