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 » Read and destroy message

Post new topic  Reply to topic
 Read and destroy message « View previous topic :: View next topic » 
Author Message
gigya74
PostPosted: Thu May 04, 2006 1:50 am    Post subject: Read and destroy message Reply with quote

Newbie

Joined: 03 Oct 2005
Posts: 6

Hi,
My requirement is to read from a queue and ensure that that message is removed from that queue.
What options do i have to use. I found some special options to make a queue browsable(brose,browse_next etc) but could not get any for this scenario.
Pl confirm if i dont give any of the browse options, the message will be destroyed from the queue after reading.
Also how do we find out the number of messages sitting in a wueue at any point of time?
thanks
venkatB
Back to top
View user's profile Send private message Send e-mail
elvis_gn
PostPosted: Thu May 04, 2006 2:16 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi gigya74,

Please read some documentation

You can use the API "get" to pick the message and have it deleted from the queue....

For the depth of the queue use the API "currentQueueDepth"....

Please find sample java programs on this forum...Use them...or atleast search before u post. Thanks.

Regards.
Back to top
View user's profile Send private message Send e-mail
gigya74
PostPosted: Thu May 04, 2006 2:34 am    Post subject: thanks elvis Reply with quote

Newbie

Joined: 03 Oct 2005
Posts: 6


venkatB
Back to top
View user's profile Send private message Send e-mail
vennela
PostPosted: Thu May 04, 2006 4:45 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Quote:
Also how do we find out the number of messages sitting in a wueue at any point of time?

If you are trying to loop until all the messages are drained off the queue, you shoyuldn't be doing that based on the currentDepth of the queue. You should loop until you get 2033 or no more messages avaiable reason code.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Read and destroy message
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.