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 » IBM MQ API Support » How to lock a message ????

Post new topic  Reply to topic
 How to lock a message ???? « View previous topic :: View next topic » 
Author Message
elvis_gn
PostPosted: Thu Feb 24, 2005 2:41 am    Post subject: How to lock a message ???? Reply with quote

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
View user's profile Send private message Send e-mail
Nigelg
PostPosted: Thu Feb 24, 2005 3:57 am    Post subject: Reply with quote

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
View user's profile Send private message
elvis_gn
PostPosted: Thu Feb 24, 2005 4:50 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
bower5932
PostPosted: Thu Feb 24, 2005 5:36 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
kirani
PostPosted: Sat Feb 26, 2005 11:44 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » How to lock a message ????
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.