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 » Browsing a queue using a correlationd id

Post new topic  Reply to topic
 Browsing a queue using a correlationd id « View previous topic :: View next topic » 
Author Message
Richard McCarthy
PostPosted: Mon Mar 18, 2002 5:02 am    Post subject: Reply with quote

Newbie

Joined: 17 Mar 2002
Posts: 2

Hi,

Can anyone tell me if it is possible to browse a queue using correlation ids ? I have code working which browses sequentially ok, but when I try it by configuring it to browse on correlation id the messages get read from the queue.

My queue open options are MQC.MQOO_INPUT_SHARED | MQC.MQOO_BROWSE and the get message options are MQC.MQGMO_NO_WAIT & MQC.MQMO_MATCH_CORREL_ID (plus all other defaults).

Thanks,

Richard
Back to top
View user's profile Send private message Send e-mail
bduncan
PostPosted: Mon Mar 18, 2002 4:47 pm    Post subject: Reply with quote

Padawan

Joined: 11 Apr 2001
Posts: 1554
Location: Silicon Valley

Well, one of the problems I see is that you are specifying MQOO_INPUT_SHARED in addition to MQOO_BROWSE. When you want to browse a queue, only do the MQOPEN with MQOO_BROWSE specified. That being said, I can't tell if that's the only problem because I would need to know exactly what you are populating the MQMD header with when you do your browse. Refer to this page:
http://www-3.ibm.com/software/ts/mqseries/library/manualsa/csqzal05/csqzal052k.htm

As you can see, you should be able to browse particular messages on the queue by placing the corresponding correllation ID in the MQMD header that you pass to the MQGET command, and specify either MQGMO_BROWSE_FIRST or MQGMO_BROWSE_NEXT in the MQGMO options. And, if you are planning to browse more than one message, you need to make sure that you set the MessageId and CorrelId in the MQMD to null after each browse. Otherwise, you will browse the same message over and over again.


_________________
Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator

[ This Message was edited by: bduncan on 2002-03-18 16:48 ]
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Browsing a queue using a correlationd id
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.