|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
[Solved] Unable to get more than 1 message from Queue |
« View previous topic :: View next topic » |
Author |
Message
|
jessie |
Posted: Fri Sep 26, 2003 12:00 am Post subject: [Solved] Unable to get more than 1 message from Queue |
|
|
Newbie
Joined: 25 Sep 2003 Posts: 4
|
Hi All,
I am writing a VB program to put and get messages from a local Queue using MQ ActiveX interface. My program can put messages to a queue successfully and is able to get all the messages (one-at-a-time) in return without having to close my program.
However, when i tried to use my program to retrieve the messages created by API Exerciser, my program is only able to get 1 message and my 2nd get attempt will always return a NO MESSAGE available. If i close and restart my program, then i am able to get 1 more message which is suppose to be my 2nd message for the first attempt. It seems that i am limited to issueing 1 get for each program run.
Can anyone help me ?
Thanks,
Jessie |
|
Back to top |
|
 |
bob_buxton |
Posted: Fri Sep 26, 2003 12:11 am Post subject: |
|
|
 Master
Joined: 23 Aug 2001 Posts: 266 Location: England
|
Are you resetting the message id and correlid back to none before your sceond get? If not MQ is trying to retrieve a message with the same ids as the previous message. _________________ Bob Buxton
Ex-Websphere MQ Development |
|
Back to top |
|
 |
jessie |
Posted: Fri Sep 26, 2003 12:32 am Post subject: |
|
|
Newbie
Joined: 25 Sep 2003 Posts: 4
|
Hi Bob,
Thanks for the advice. It does solve my problem...
BTW, i saw a lot of reference from the manual about these two properties - CorrelationID & MessageID, when would i use them ? Currently, i just set them to null.
Cheers,
Jessie |
|
Back to top |
|
 |
bower5932 |
Posted: Mon Sep 29, 2003 10:27 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
The message id and correlation id come in handy when you are sending messages back and forth between a client application and a server application. The client can have MQ generate a unique message id that gets sent to the server. The server can them move the message id to the correlation id and reply back. Your client can then get the reply by looking for the message that has its message id in the correlation id.
There are some details in the Application Programming Reference. |
|
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
|
|
|
|