[rabbitmq-discuss] [PATCH] Add exclusive queue support to stomp adaptor

Steve Powell steve at rabbitmq.com
Mon Mar 26 15:40:54 BST 2012


Hi Jeff,

> It does look like /queue/ would do the exclusive access (not sure from
> the docs - it just says message will be delivered to one subscriber, not
> sure if that means it'll block out other subscribers or distribute among
> connected subscribers).

The doc says it will create a shared queue (not exclusive). The
sentence:

> Queue destinations deliver each message to at most one subscriber.

means simply that any particular message is sent to only one of the
subscribers. There may be many subscribers, though.

I'm not sure that the 'exclusive' option that activemq supplies is quite
what your patch would achieve; here is what the AMQP reference says
about the exclusive bit on queue declarations:

> Exclusive queues may only be accessed by the current connection, and are
> deleted when that connection closes. Passive declaration of an exclusive
> queue by other connections are not allowed.

This doesn't stop the server putting messages on the queue -- this would
depend upon how it is bound to an exchange. Another connection doesn't
need access to the queue to publish a message that might get there.
However, if you SEND to the /queue/name (on another STOMP connection)
then that will fail if the queue was declared exclusive, because the
queue cannot be 'created' (or even passively declared).

HOWEVER, you said you were using amq/queue/<name> destinations. In that
case no queue declarations are ever made in STOMP SEND or SUBSCRIBE,
and so the mod you sent wouldn't help either.

Unfortunately, making it exclusive (via the web ui or anywhere else)
will prevent any other connection (a STOMP one, even) from accessing it
(SUBSCRIBE will fail -- the queue will look like it doesn't exist). So
you are scuppered there, too.

Can you explain more about activemq's exclusive option? How is it
applied? Can you define it and the 'first subscriber that comes along'
gets it? What happens exactly when we attempt to subscribe to it from
another connection?

At the moment, I'm not at all sure how we might ensure that there is
only one consumer (at a time?) for any queue. But IDKE.

Steve Powell  (a sorry bunny)
----------some more definitions from the SPD----------
chinchilla (n.) Cooling device for the lower jaw.
socialcast (n.) Someone to whom everyone is speaking but nobody likes.
literacy (n.) A textually transmitted disease usually contracted in childhood.


More information about the rabbitmq-discuss mailing list