You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by Hiram Chirino <hi...@hiramchirino.com> on 2011/12/06 10:48:09 UTC

[Apollo] just added support for Kafka style Durable Subscriptions

Hi,

I just put in a couple of STOMP protocol enhancements which when combined
allow you to implement faster pub/sub durable subscriptions than what has been
previously possible.

You can use queue browsers with consumer side message sequence tracking to
achieve the same semantics as durable topics subscriptions but with a better
performance profile. Since browsers do not delete messages from a queue, when
you use multiple browsers against one queue you get the same broadcast effects
that a topic provides.

In this approach the subscribing application keeps track of the last sequence
number processed from the subscription. The sequence number is typically
stored as part of the unit of work which is processing the message. The
subscription can use the default auto acknowledge mode but still get 'once and
only once' delivery guarantees since:

 * consuming application records the last message sequence that
   was processed
 * message are not deleted when delivered to the subscriber
 * on a failures, a consuming application can resume receiving from the queue
   for the last sequence that it received.

To implement those semantics a couple new options are supported
on the `SUBSCRIBE` frame which were tracked by issues:
https://issues.apache.org/jira/browse/APLO-99 and
https://issues.apache.org/jira/browse/APLO-100

More detailed info and examples of how to setup can be seen at:
http://activemq.apache.org/apollo/versions/1.0-SNAPSHOT/website/documentation/user-manual.html#Using_Queue_Browsers_to_Implement_Durable_Topic_Subscriptions

Regards,
Hiram

FuseSource
Web: http://fusesource.com/