Author |
Message
|
elvis_gn |
Posted: Thu Feb 24, 2005 2:41 am Post subject: How to lock a message ???? |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
I want to lock a message from other users of the queue and release it later....
I found an option of MQC.MQGMO_LOCK.....but this is giving me an error mqrc 2046(OPTIONS_ERROR) when used with MQC.MQGMO_MSG_UNDER_CURSOR..
The queue open options are
openOptions = MQC.MQOO_INQUIRE | MQC.MQOO_INPUT_SHARED | MQC.MQOO_BROWSE
Can someone suggest the correct options to use.......I have to use browse through queue and then lock the message which matches the message id I have...... |
|
Back to top |
|
 |
Nigelg |
Posted: Thu Feb 24, 2005 3:57 am Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
Use BROWSE and LOCK together. When you have found the msg you want, get it without BROWSE and with MSG_UNDER_CURSOR. This is covered in exhaustive detail in the APR, MQGMO Options. |
|
Back to top |
|
 |
elvis_gn |
Posted: Thu Feb 24, 2005 4:50 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
I went though the APR.........
As u said, i first browse and then get....
I first used the BROWSE option.........
Once i found the message i used the LOCK and BROWSE_MSG_UNDER_CURSOR...........
My message was locked and not removed just as i want it but when i opened another instance of the same application and ran it, it started showing me mqrc 2033 error....
How can i make the other program exclude or overlook locked messages in the queue.....????? |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Feb 24, 2005 5:36 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
elvis_gn wrote: |
it started showing me mqrc 2033 error....
How can i make the other program exclude or overlook locked messages in the queue.....????? |
If you locked the messages and your second program got a 2033 (no message available), then I'd say things are working. |
|
Back to top |
|
 |
kirani |
Posted: Sat Feb 26, 2005 11:44 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
What is the criteria for getting messages in your second program? _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
|