[rabbitmq-discuss] STOMP plug-in, HA queues, and consumer cancelations

Steve Powell steve at rabbitmq.com
Tue Jul 3 17:06:32 BST 2012


Mea Culpa,

You are quite right. Your understanding of HA queues is better than
mine. However, AFAICS the STOMP adapter doesn't present
the consumer_cancel_notify capability to the (Erlang) connection, so
will not receive a notification when the consumer is cancelled.

The STOMP client will think that the subscription is sound even if the
underlying consumer was cancelled. We can probably do better than this.

Although the STOMP client will stop receiving messages, I would not
characterise this as 'dangerous', merely frustrating.

Can you say what you think the correct STOMP behaviour ought to be if a
subscription's consumer is unilaterally cancelled? I'm tempted to simply
send an ERROR frame and simulate an UNSUBSCRIBE,
leaving the STOMP client to recover however it thinks fit.

Steve Powell
steve at rabbitmq.com
[wrk: +44-2380-111-528] [mob: +44-7815-838-558]

On 2 Jul 2012, at 17:21, Elias Levy wrote:

> On Mon, Jul 2, 2012 at 8:50 AM, Steve Powell <spowell at vmware.com> wrote:
> STOMP doesn't know that a queue is HA and will not mend a broken
> subscription; however, the subscription shouldn't be broken unless the
> broker connected to goes down, in which case the connection will be
> lost, the STOMP session will fail, and the subscription with it.
> Why do you say that the subscription will not be broken unless the broker connected to (I assume by the STOMP client) goes down?
> My understanding is that with a HA queue if the node hosting the HA queue master goes down, the new promoted HA queue master considers all previous subscriptions to have been disconnected, and issues a consumer cancelation to all consumers of those subscriptions that support the feature.  Thus, a consumer that does not support consumer cancelation will believe his subscription to the HA queue is still valid and wait indefinitely for messages that will never arrive.
> Am I wrong?
> By this logic, if the RMQ STOMP proxy does not handle consumer cancelations, then its rather dangerous to use it to consume from a HA queue.
> Elias Levy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120703/3df388db/attachment.htm>

More information about the rabbitmq-discuss mailing list