|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Queue exclusive mode |
« View previous topic :: View next topic » |
Author |
Message
|
jljunk |
Posted: Fri Mar 22, 2013 1:09 am Post subject: Queue exclusive mode |
|
|
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 |
|
 |
Esa |
Posted: Fri Mar 22, 2013 1:18 am Post subject: |
|
|
 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 |
|
 |
boos |
Posted: Mon Mar 25, 2013 7:00 am Post subject: |
|
|
 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 |
|
 |
bruce2359 |
Posted: Mon Mar 25, 2013 8:41 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
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
|
|
|
|