|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Sharing MQQueueManager |
« View previous topic :: View next topic » |
Author |
Message
|
yaravind |
Posted: Wed Mar 26, 2003 7:29 am Post subject: Sharing MQQueueManager |
|
|
Apprentice
Joined: 17 Jun 2002 Posts: 25
|
I want to open the same Q for both BROWSE and GET at the same time. Is this possibble?
MQQueueManager qm=new MQQueueManager(....);
//the queue is being opened in two diff modes using the same QM object
qm.open(myQueue, openForBROWSE);
//I am opening the same queue in GET mode before closing it
qm.open(myQueue, openForGET);
Thanks in advance. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Mar 26, 2003 7:49 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
What happens when you run the code you have listed?
The Application Programming Guide says the following:
Quote: |
Removing a message you have browsed
You can remove from the queue a message you have already browsed provided you have opened the queue for removing messages as well as for browsing. (You must specify one of the MQOO_INPUT_* options, as well as the MQOO_BROWSE option, on your MQOPEN call.)
To remove the message, call MQGET again, but in the Options field of the MQGMO structure, specify MQGMO_MSG_UNDER_CURSOR. In this case, the MQGET call ignores the MsgId, CorrelId, and GroupId fields of the MQMD structure.
In the time between your browsing and removal steps, another program may have removed messages from the queue, including the message under your browse cursor. In this case, your MQGET call returns a reason code to say that the message is not available. |
|
|
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
|
|
|
|