You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by mi...@apache.org on 2018/02/20 08:46:50 UTC

[1/2] activemq-artemis git commit: ARTEMIS-853 - Add documents

Repository: activemq-artemis
Updated Branches:
  refs/heads/master 34146c0ce -> 3c7d57c9c


ARTEMIS-853 - Add documents

Exclusive Queue documents added to detail behaviour and how to configure.
Also update docuents for last-value queue to cover addtional ways to configure

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

Branch: refs/heads/master
Commit: 03f4a52f1f1de52f4827321ede96437ff57c2a03
Parents: 34146c0
Author: Michael André Pearce <mi...@me.com>
Authored: Tue Feb 20 08:39:37 2018 +0000
Committer: Michael André Pearce <mi...@me.com>
Committed: Tue Feb 20 08:43:43 2018 +0000

----------------------------------------------------------------------
 docs/user-manual/en/SUMMARY.md           |  1 +
 docs/user-manual/en/address-model.md     | 22 +++++++++++
 docs/user-manual/en/exclusive-queues.md  | 53 +++++++++++++++++++++++++++
 docs/user-manual/en/last-value-queues.md | 33 +++++++++++++++--
 4 files changed, 105 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/03f4a52f/docs/user-manual/en/SUMMARY.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index e92a033..31b71c9 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -33,6 +33,7 @@
 * [Paging](paging.md)
 * [Scheduled Messages](scheduled-messages.md)
 * [Last-Value Queues](last-value-queues.md)
+* [Exclusive Queues](exclusive-queues.md)
 * [Message Grouping](message-grouping.md)
 * [Extra Acknowledge Modes](pre-acknowledge.md)
 * [Management](management.md)

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/03f4a52f/docs/user-manual/en/address-model.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/address-model.md b/docs/user-manual/en/address-model.md
index fe8891c..be03a19 100644
--- a/docs/user-manual/en/address-model.md
+++ b/docs/user-manual/en/address-model.md
@@ -427,6 +427,28 @@ Open the file <broker-instance>/etc/broker.xml for editing.
 </configuration>
 ```
 
+#### Pre-configuring a queue as an exclusive consumer queue
+
+If a user requires to pre-create a queue that routes exclusively to one active consumer the **exclusive** flag can be enabled on the queue.  
+When **exclusive** is set to **true**.  The queue will route messages to the a single active consumer.  When the active consumer that is being routed to is detached from the queue, if another active consumer exist, one will be chosen and routing will now be exclusive to it. 
+
+See [Exclusive Queue](exclusive.md) for further information.
+
+Open the file <broker-instance>/etc/broker.xml for editing.
+
+```xml
+<configuration ...>
+  <core ...>
+    ...
+    <address name="foo.bar">
+      <multicast>
+        <queue name="orders1" exclusive="true"/>
+      </multicast>
+    </address>
+  </core>
+</configuration>
+```
+
 ## Additional Information: Protocol Managers, Address
 
 A protocol manager maps protocol specific concepts down to the Apache ActiveMQ Artemis core model of addresses, queues and routing types. For example, when a client sends a MQTT subscription packet with the addresses 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/03f4a52f/docs/user-manual/en/exclusive-queues.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/exclusive-queues.md b/docs/user-manual/en/exclusive-queues.md
new file mode 100644
index 0000000..a7f97cc
--- /dev/null
+++ b/docs/user-manual/en/exclusive-queues.md
@@ -0,0 +1,53 @@
+# Exclusive Queues
+
+Exclusive queues are special queues which route all messages to only one 
+consumer at a time.
+
+This is useful when you want all messages to be processed serially by the same consumer, 
+when a producer does not specify [Message Grouping](message-grouping.md).
+
+An example might be orders sent to an address and you need to consume them 
+in the exact same order they were produced.
+
+Obviously exclusive queues have a draw back that you cannot scale out the consumers to 
+improve consumption as only one consumer would technically be active. 
+Here we advise that you look at message groups first.
+
+
+## Configuring Exclusive Queues
+
+Exclusive queues can be pre configured at the address queue level
+
+```xml
+<configuration ...>
+  <core ...>
+    ...
+    <address name="foo.bar">
+      <multicast>
+        <queue name="orders1" exclusive="true"/>
+      </multicast>
+    </address>
+  </core>
+</configuration>
+```
+
+Specified on creating a Queue by using the CORE api specifying the parameter `exclusive` to `true`. 
+
+Or on auto-create when using the JMS Client by using address parameters when creating the destination used by the consumer.
+
+    Queue queue = session.createQueue("my.destination.name?exclusive=true");
+    Topic topic = session.createTopic("my.destination.name?exclusive=true");
+
+Also the default for all queues under and address can be defaulted using the address-setting configuration:
+
+    <address-setting match="lastValueQueue">
+       <default-exclusive-queue>true</default-exclusive-queue>
+    </address-setting>
+
+By default, `exclusive-queue` is false. Address wildcards can be used
+to configure Exclusive queues for a set of addresses (see [here](wildcard-syntax.md)).
+
+
+## Example
+
+See `org.apache.activemq.artemis.tests.integration.jms.client.ExclusiveTest`

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/03f4a52f/docs/user-manual/en/last-value-queues.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/last-value-queues.md b/docs/user-manual/en/last-value-queues.md
index 88abe3a..c02eb2f 100644
--- a/docs/user-manual/en/last-value-queues.md
+++ b/docs/user-manual/en/last-value-queues.md
@@ -10,14 +10,39 @@ are only interested by the latest value for a particular stock.
 
 ## Configuring Last-Value Queues
 
-Last-value queues are defined in the address-setting configuration:
+Last-Value queues can be pre configured at the address queue level
+
+```xml
+<configuration ...>
+  <core ...>
+    ...
+    <address name="foo.bar">
+      <multicast>
+        <queue name="orders1" last-value="true"/>
+      </multicast>
+    </address>
+  </core>
+</configuration>
+```
+
+Specified on creating a Queue by using the CORE api specifying the parameter `lastValue` to `true`. 
+
+Or on auto-create when using the JMS Client by using address parameters when creating the destination used by the consumer.
+
+    Queue queue = session.createQueue("my.destination.name?last-value=true");
+    Topic topic = session.createTopic("my.destination.name?last-value=true");
+
+Also the default for all queues under and address can be defaulted using the address-setting configuration:
 
     <address-setting match="lastValueQueue">
-       <last-value-queue>true</last-value-queue>
+       <default-last-value-queue>true</default-last-value-queue>
     </address-setting>
 
-By default, `last-value-queue` is false. Address wildcards can be used
-to configure Last-Value queues for a set of addresses (see [here](wildcard-syntax.md)).
+By default, `default-last-value-queue` is false. 
+Address wildcards can be used to configure Last-Value queues 
+for a set of addresses (see [here](wildcard-syntax.md)).
+
+Note that address-setting `last-value-queue` config is deprecated, please use `default-last-value-queue` instead.
 
 ## Using Last-Value Property
 


[2/2] activemq-artemis git commit: This closes #1880

Posted by mi...@apache.org.
This closes #1880


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

Branch: refs/heads/master
Commit: 3c7d57c9cbac0fc07a3bd80695ce8a4cebfbc159
Parents: 34146c0 03f4a52
Author: Michael Andre Pearce <mi...@me.com>
Authored: Tue Feb 20 08:46:39 2018 +0000
Committer: Michael Andre Pearce <mi...@me.com>
Committed: Tue Feb 20 08:46:39 2018 +0000

----------------------------------------------------------------------
 docs/user-manual/en/SUMMARY.md           |  1 +
 docs/user-manual/en/address-model.md     | 22 +++++++++++
 docs/user-manual/en/exclusive-queues.md  | 53 +++++++++++++++++++++++++++
 docs/user-manual/en/last-value-queues.md | 33 +++++++++++++++--
 4 files changed, 105 insertions(+), 4 deletions(-)
----------------------------------------------------------------------