|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Browsing a queue using a correlationd id |
« View previous topic :: View next topic » |
Author |
Message
|
Richard McCarthy |
Posted: Mon Mar 18, 2002 5:02 am Post subject: |
|
|
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 |
|
 |
bduncan |
Posted: Mon Mar 18, 2002 4:47 pm Post subject: |
|
|
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 |
|
 |
|
|
 |
|
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
|
|
|
|