activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andytay...@apache.org
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


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/f5b8add6
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/f5b8add6
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/f5b8add6

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

----------------------------------------------------------------------
 .../en/protocols-interoperability.md            | 42 ++++++++++++++++++++
 1 file changed, 42 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f5b8add6/docs/user-manual/en/protocols-interoperability.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/protocols-interoperability.md b/docs/user-manual/en/protocols-interoperability.md
index ac62058..2b419e1 100644
--- a/docs/user-manual/en/protocols-interoperability.md
+++ b/docs/user-manual/en/protocols-interoperability.md
@@ -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
of 
+`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


Mime
View raw message