|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Checking for Messages in Queue |
« View previous topic :: View next topic » |
Author |
Message
|
rbharatha |
Posted: Sun Oct 19, 2003 11:28 pm Post subject: Checking for Messages in Queue |
|
|
Newbie
Joined: 18 Oct 2003 Posts: 5
|
Dim mqMsg As New MQMessage ' MQMessage instance
Dim mqGetMsgOpts As New MQGetMessageOptions ' MQGetMessageOptions
'
oMqQueue.Get(mqMsg, mqGetMsgOpts)
'
I want to check for Messages in the Queue, before getting the Messages from the Queue. How can i do that.
I am client and Server connection type. _________________ Ramesh Bharata |
|
Back to top |
|
 |
mqonnet |
Posted: Mon Oct 20, 2003 5:18 am Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
In your open options add MQOO_BROWSE and in your get options add MQGMO_BROWSE_NEXT. This way you would be able to browse a message first before destructively getting it.
Cheers
Kumar |
|
Back to top |
|
 |
rbharatha |
Posted: Mon Oct 20, 2003 5:34 am Post subject: Checking for Messages in Queue - "Before Reading it&quo |
|
|
Newbie
Joined: 18 Oct 2003 Posts: 5
|
Hi Kumar:
It can be one option, but browse to next message in the Queue, It would generate an exception saying the completion code:2033.
I want over come this and check before it prompts me an execption.
can anybody look into this. _________________ Ramesh Bharata |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Oct 20, 2003 5:39 am Post subject: Re: Checking for Messages in Queue - "Before Reading it |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
rbharatha wrote: |
It can be one option, but browse to next message in the Queue, It would generate an exception saying the completion code:2033.
|
2033 is a reason code, not a completion code. It means "no more messages on the queue". Which means you've browsed past the last message.
rbharatha wrote: |
I want over come this and check before it prompts me an execption.
|
This should be as simple as changing your code to check for the error condition, and not throwing an exception.
Quote: |
can anybody look into this. |
There are several manuals available from IBM that will allow you to figure a lot of stuff out yourself, instead of waiting for someone here to answer your question. Just click on the button marked 'Documentation' at the top of the screen.
I recommend reading the Application Programming Guide, and the Using the Component Object Model Interface manual since you appear to be working with VB. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
packetOfFudge |
Posted: Mon Oct 20, 2003 6:12 am Post subject: |
|
|
Newbie
Joined: 20 Oct 2003 Posts: 1
|
Surely asking a question on a forum is the whole idea Jeff! |
|
Back to top |
|
 |
mqonnet |
Posted: Mon Oct 20, 2003 6:28 am Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
packetOfFudge, You have to remember that NOBODY here is DOING a FREE CONSULTING. A Forum is meant to assist people in a specific area or topic to resolve the doubts they have. It is not meant to provide Solutions. You have solution providers for that.
The reason Jeff and anyone who posts here points to the docs because most of the stuff is in the docs. Some people are not aware of it and hence pointed to, others just dont want to read the manuals. :). That again doesnt mean that people do not go out of their ways to post solutions, which is always welcome you see.
Saying so, does not mean that you should not post a question that pops into your mind. A person who posts a very silly question, might be silly for an experienced professional but a hard one for a novice. Hence you have to try and assist everyone accordingly only.
Cheers
Kumar |
|
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
|
|
|
|