activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [2/2] activemq-artemis git commit: ARTEMIS-413 doc for Stomp durable subs
Date Mon, 25 Jul 2016 15:24:26 GMT
ARTEMIS-413 doc for Stomp durable subs


Branch: refs/heads/master
Commit: f5b8add6f35fe755aa6b3fe7c1cef6e698b998c9
Parents: ef3df35
Author: jbertram <>
Authored: Thu Jul 21 13:45:47 2016 -0500
Committer: Andy Taylor <>
Committed: Mon Jul 25 16:24:12 2016 +0100

 .../en/            | 42 ++++++++++++++++++++
 1 file changed, 42 insertions(+)
diff --git a/docs/user-manual/en/ b/docs/user-manual/en/
index ac62058..2b419e1 100644
--- a/docs/user-manual/en/
+++ b/docs/user-manual/en/
@@ -398,6 +398,48 @@ The same logic applies when mapping a JMS message or a Core message to
 Stomp. A Stomp 1.0 client can check the presence of the `content-length`
 header to determine the type of the message body (String or bytes).
+#### Durable Subscriptions
+The `SUBSCRIBE` and `UNSUBSCRIBE` frames can be augmented with special headers to create
+and destroy durable subscriptions respectively.
+To create a durable subscription the `client-id` header must be set on the `CONNECT` frame
+and the `durable-subscription-name` must be set on the `SUBSCRIBE` frame. The combination
+of these two headers will form the identity of the durable subscription.
+To delete a durable subscription the `client-id` header must be set on the `CONNECT` frame
+and the `durable-subscription-name` must be set on the `UNSUBSCRIBE` frame. The values for
+these headers should match what was set on the `SUBSCRIBE` frame to delete the corresponding
+durable subscription.
+It is possible to pre-configure durable subscriptions since the Stomp implementation creates
+the queue used for the durable subscription in a deterministic way (i.e. using the format
+`client-id`.`subscription-name`). For example, if you wanted to configure a durable 
+subscription on the JMS topic `myTopic` with a client-id of `myclientid` and a subscription

+name of `mysubscriptionname` then first you'd configure the topic:
+   <jms xmlns="urn:activemq:jms">
+      ...
+      <topic name="myTopic"/>
+      ...
+   </jms>
+Then configure the durable subscription:
+   <core xmlns="urn:activemq:core">
+      ...
+      <queues>
+         <queue name="myclientid.mysubscription">
+            <address>jms.topic.myTopic</address>
+         </queue>
+      </queues>
+      ...
+   </core>
 #### Message IDs for Stomp messages
 When receiving Stomp messages via a JMS consumer or a QueueBrowser, the

View raw message