Author |
Message
|
4integration |
Posted: Fri Oct 26, 2007 3:04 am Post subject: "Disable" subscription |
|
|
 Disciple
Joined: 04 Sep 2006 Posts: 197 Location: Gothenburg, Sweden
|
Hello,
We are using Pub/Sub a lot and during tests we sometimes get unwanted behavior.
For instance assume that we have a number of durable subscriptions registered and there are publishers available. I some cases we want them to be separated, e.g. disabling a subscription to be able to manually put messages on the subscriber queue without being disturbed by the publishing applications.
Is there a way of disabling a durable subscription without delete it? _________________ Best regards
4 Integration |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Oct 26, 2007 3:07 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have the subscription go to an alias queue. You can put disable the alias queue and still post manually on the base queue.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
4integration |
Posted: Fri Oct 26, 2007 3:46 am Post subject: |
|
|
 Disciple
Joined: 04 Sep 2006 Posts: 197 Location: Gothenburg, Sweden
|
fjb_saper wrote: |
Have the subscription go to an alias queue. You can put disable the alias queue and still post manually on the base queue.
Enjoy  |
Thanks, we have actually have had that as an option under discussion.
Will an alias queue in between cause extra overhead instead of just one local queue? _________________ Best regards
4 Integration |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Oct 26, 2007 8:00 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
I have never heard anyone say anything about overhead for an Alias queue. Obviously there must be some internally, but its miniscule.
FJ, I don't understand. Assume ALIASQ resolves to BASEQ. The publisher puts to what? The subcriber gets from what?
Won't the Broker try and publish directly to the q name that the subscriber subscribed with?
Why not just GET disable the subscriber q (a plain local queue that the Broker can still publish directly to)? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Oct 26, 2007 8:07 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I guess the subscriber would register the subscription to the ALIAS queue name, rather than the local queue name.
And would get from the local queue name.
The point is not to disable the subscriber, either. It's to (temporarily) prevent the publisher from sending messages to the subscriber, but still allow for the subscriber to receive (non-published) messages.
So the subscription is registered to a QALIAS. The publisher sends to that, but the QALIAS is then PUT disabled - so, in theory, the publisher can't submit messages.
Except QALIASs can't be changed on the fly like that, in most cases. The broker would have to close it's handle to that queue, or get errors. This might still prevent the publisher from sending stuff, but it would still require the broker to be recycled (likely) when the QALIAS was reset. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Oct 26, 2007 8:20 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
jefflowrey wrote: |
So the subscription is registered to a QALIAS. The publisher sends to that, but the QALIAS is then PUT disabled - so, in theory, the publisher can't submit messages.
|
I don't see what the Alias q buys us here. Just put inhibit the local q to prevent the broker from publishing, or get disbale the local q to prevent the subscriber from getting.
 _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
bower5932 |
Posted: Fri Oct 26, 2007 8:24 am Post subject: Re: "Disable" subscription |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
4integration wrote: |
Is there a way of disabling a durable subscription without delete it? |
I think I'm confused by what disable means. If you don't want your subscriber to pick up messages, then just end it without deregistering. This would allow you to put messages onto its queue without worrying about them being retrieved. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Oct 26, 2007 8:28 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
PeterPotkay wrote: |
jefflowrey wrote: |
So the subscription is registered to a QALIAS. The publisher sends to that, but the QALIAS is then PUT disabled - so, in theory, the publisher can't submit messages.
|
I don't see what the Alias q buys us here. Just put inhibit the local q to prevent the broker from publishing, or get disbale the local q to prevent the subscriber from getting.
 |
Because, with the alias - the qlocal is NOT put-disabled, and so messages can still be given to the subscriber. Just not through the alias. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|