[rabbitmq-discuss] STOMP plugin - durable subscription limitation
michael.justin at gmx.net
Thu Oct 18 17:11:52 BST 2012
there is a limitation in the STOMP plugin when using durable subscriptions.
With normal topic destinations, the SUBSCRIBE command can use different
'id' frame headers to create concurrent subscriptions for the same
topic. This can be achieved by assigning a unique identifier per
consumer, so that incoming messages can be routed to the consumer based
on the value of the subscription id header. Example:
1. RabbitMQ with a normal (non-durable) subscription
However, RabbitMQ uses the id header differently for topic
subscriptions. Sending and receiving requires to set the same value, so
that consumers are not able to assign any random identifier in the
SUBSCRIBE frame. Is this correct so far and as designed?
This has the effect that a client can not handle more than one consumer
for the same durable subscription because a SUBSCRIBE frame can not use
a client-side assigned identifier in the same way and use it to route
incoming messages based on this id between internal 'consumers'.
2. RabbitMQ with durable subscription
In ActiveMQ and other brokers with STOMP support, a durable topic
subscription uses a special header for the subscription id
(activemq.subscriptionName), which leaves the id header still available
for a client-assigned unique identifer.
3. ActiveMQ example
The STOMP 1.0 specification says:
"You can also specify an id header which can then later on be used to
UNSUBSCRIBE from the specific subscription as you may end up with
overlapping subscriptions using selectors with the same destination."
In RabbitMQ however, overlapping subscriptions seem to be impossible for
a durable topic, as there is no way to specify unique values for the id.
Is this correct?
Many thanks in advance
habarisoft - Enterprise Messaging Software for Delphi
More information about the rabbitmq-discuss