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 » General IBM MQ Support » Browsing messages

Post new topic  Reply to topic
 Browsing messages « View previous topic :: View next topic » 
Author Message
Kappa
PostPosted: Mon Sep 12, 2005 1:15 am    Post subject: Browsing messages Reply with quote

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
View user's profile Send private message
sebastianhirt
PostPosted: Mon Sep 12, 2005 1:38 am    Post subject: Reply with quote

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
View user's profile Send private message
Mr Butcher
PostPosted: Mon Sep 12, 2005 1:42 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

do you clear the messageid and correlid after the first successful browse?
_________________
Regards, Butcher
Back to top
View user's profile Send private message
bower5932
PostPosted: Mon Sep 12, 2005 6:04 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

Try looking at the amqsbcg0.c sample that ships with the product. If using java, take a look at amqsbcg.java at:

http://www.developer.ibm.com/isv/tech/sampmq.html
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
JT
PostPosted: Mon Sep 12, 2005 7:52 am    Post subject: Reply with quote

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
View user's profile Send private message
VijayGoparaju`
PostPosted: Thu Aug 28, 2008 10:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
David.Partridge
PostPosted: Thu Aug 28, 2008 11:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
gbaddeley
PostPosted: Sun Aug 31, 2008 5:49 pm    Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2494
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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Browsing messages
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.