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 » General IBM MQ Support » Queue exclusive mode

Post new topic  Reply to topic
 Queue exclusive mode « View previous topic :: View next topic » 
Author Message
jljunk
PostPosted: Fri Mar 22, 2013 1:09 am    Post subject: Queue exclusive mode Reply with quote

Newbie

Joined: 21 Mar 2013
Posts: 2

Been trying to work out how to configure a client and/or queue so that it is in exclusive mode.

ie
a single consumer client app may be attached to the queue.
if a second client attempts to attache then it gets an error.

Is this possible using IBM MQ & JMS?

Thanks
Back to top
View user's profile Send private message
Esa
PostPosted: Fri Mar 22, 2013 1:18 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Take a look at queue attributes shareability and default input open option
Back to top
View user's profile Send private message
boos
PostPosted: Mon Mar 25, 2013 7:00 am    Post subject: Reply with quote

Apprentice

Joined: 27 Jan 2004
Posts: 37
Location: Netherlands

to be a bit more specific:
If you open the queue with the option MQOO_INPUT_EXCLUSIVE the queue can only be opend by one (client) that opens the queue first with that option. The second client that tries to open that queue with an exclusive option recieves an error. Even if the queue is already opened by a client with a shared option (i.e MQOO_INPUT_SHARED) and another client tries to open it with option exclusive you recieve an error (because you can't get an exclusive read on a queue if someone is already listening on that queue).
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Mar 25, 2013 8:41 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9472
Location: US: west coast, almost. Otherwise, enroute.

boos wrote:
to be a bit more specific:
If you open the queue with the option MQOO_INPUT_EXCLUSIVE the queue can only be opend by one (client) that opens the queue first with that option. The second client that tries to open that queue with an exclusive option recieves an error. Even if the queue is already opened by a client with a shared option (i.e MQOO_INPUT_SHARED) and another client tries to open it with option exclusive you recieve an error (because you can't get an exclusive read on a queue if someone is already listening on that queue).

Too complicated an explanation.

At MQOPEN the application gets to pick one of these:
- MQOO_INPUT_EXCLUSIVE: this application wants to be the sole consumer of messages. Exclusive conflicts with all other apps attempting to open this queue SHARED and EXCLUSIVE.
- MQOO_INPUT_SHARED: this application wants to be one of any number of other consuming apps with SHARED access.
- MQOO_INPUT_AS_Q_DEF: this application wants to open the queue using the shard/exclusive value set at the queue.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Queue exclusive mode
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.