Author |
Message
|
Kappa |
Posted: Mon Sep 12, 2005 1:15 am Post subject: Browsing messages |
|
|
Newbie
Joined: 08 Sep 2005 Posts: 7
|
When I want to get all messages from a queue using get method I got first a then only no message available failure (Reason 2033). I access the queue by MQC.MQOO_BROWSE | MQC.MQOO_INQUIRE | MQC.MQOO_INPUT_AS_Q_DEF options and set getting options to MQC.MQGMO_BROWSE_NEXT.
Forgot I anything?
Thanx |
|
Back to top |
|
 |
sebastianhirt |
Posted: Mon Sep 12, 2005 1:38 am Post subject: |
|
|
Yatiri
Joined: 07 Jun 2004 Posts: 620 Location: Germany
|
Am not a programmer, but I usually use, MQC.MQGMO_BROWSE_FIRST.
Hope this helps
Sebastian |
|
Back to top |
|
 |
Mr Butcher |
Posted: Mon Sep 12, 2005 1:42 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
do you clear the messageid and correlid after the first successful browse? _________________ Regards, Butcher |
|
Back to top |
|
 |
bower5932 |
Posted: Mon Sep 12, 2005 6:04 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
|
Back to top |
|
 |
JT |
Posted: Mon Sep 12, 2005 7:52 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
Quote: |
When I want to get all messages from a queue using get method I got first a then only no message available failure (Reason 2033). |
Can you clarify your statement for me?
Did you actually retrieve a message from the queue and then on a subsequent 'Get' you received the 2033 reason code.
If so, this is the way MQ is designed. The 2033 reason is telling you 'no messages are available' or in your case, more precisely, 'no more messages are available'. |
|
Back to top |
|
 |
VijayGoparaju` |
Posted: Thu Aug 28, 2008 10:08 pm Post subject: |
|
|
Acolyte
Joined: 26 Aug 2008 Posts: 72
|
I am also facing the same problem, I am getting only First message and it is repeting continuosly,I am not able to get the next Messages from the Queue.
I used:
queue = queueManager.AccessQueue( txtQueueName1.Text, MQC.MQOO_FAIL_IF_QUIESCING | MQC.MQOO_BROWSE );
queueGetMessageOptions.Options = MQC.MQGMO_BROWSE_FIRST;
queueGetMessageOptions.Options = MQC.MQGMO_BROWSE_NEXT ;
queueGetMessageOptions.Options = MQC.MQGMO_MSG_UNDER_CURSOR;
queue.Get(queueMessage, queueGetMessageOptions);
But Still i am getting the First Message.
Please Help me,
Vijay.... |
|
Back to top |
|
 |
David.Partridge |
Posted: Thu Aug 28, 2008 11:21 pm Post subject: |
|
|
 Master
Joined: 28 Jun 2001 Posts: 249
|
Vijay, like Ron said, read the source code of amqsbcg0.c carefully. All should be clear. _________________ Cheers,
David C. Partridge |
|
Back to top |
|
 |
gbaddeley |
Posted: Sun Aug 31, 2008 5:49 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
Set the Options to include BROWSE_FIRST before starting the loop that gets messages. At the end of the loop, set the get Options again with BROWSE_NEXT instead of BROWSE_FIRST.
And as already mentioned, set the MsgId to MQMI_NONE and the CorrelId to MQCI_NONE immediately before the GET operation. _________________ Glenn |
|
Back to top |
|
 |
|