[ 
https://issues.apache.org/jira/browse/ARTEMIS-2787?focusedWorklogId=441638&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-441638
 ]

ASF GitHub Bot logged work on ARTEMIS-2787:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Jun/20 02:09
            Start Date: 05/Jun/20 02:09
    Worklog Time Spent: 10m 
      Work Description: michaelpearce-gain commented on a change in pull 
request #3169:
URL: https://github.com/apache/activemq-artemis/pull/3169#discussion_r435652202



##########
File path: docs/user-manual/en/address-model.md
##########
@@ -527,6 +527,34 @@ Open the file `<broker-instance>/etc/broker.xml` for 
editing.
 </addresses>
 ```
 
+#### Disabled Queue
+
+If a user requires to statically configure a queue and disable routing to it,
+for example where a queue needs to be defined so a consumer can bind, 
+but you want to disable message routing to it for the time being.
+
+Or you need to stop message flow to the queue to allow investigation keeping 
the consumer bound, 
+but dont wish to have further messages routed to the queue to avoid message 
build up.
+  
+When **enabled** is set to **true**  the queue will have messages routed to 
it. (default)
+
+When **enabled** is set to **false**  the queue will NOT have messages routed 
to it.
+
+Open the file `<broker-instance>/etc/broker.xml` for editing.
+
+```xml
+<addresses>
+   <address name="foo.bar">
+      <multicast>
+         <queue name="orders1" enabled="false"/>
+      </multicast>
+   </address>
+</addresses>
+```
+
+Warning: Disabling all the queues on an address means that any message sent to 
that address will be silently dropped.

Review comment:
       @jbertram  added doc in line to be explicit if someone disables all 
queues.

##########
File path: 
artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/QueueAttributes.java
##########
@@ -103,6 +105,8 @@ public void set(String key, String value) {
             setAutoDeleteMessageCount(Long.valueOf(value));
          } else if (key.equals(RING_SIZE)) {
             setRingSize(Long.valueOf(value));
+         } else if (key.equals(ENABLED)) {
+            setRingSize(Long.valueOf(value));
          }

Review comment:
       fixed




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 441638)
    Time Spent: 2h 20m  (was: 2h 10m)

> Allow a queue to be disabled, so that messages are not routed to it.
> --------------------------------------------------------------------
>
>                 Key: ARTEMIS-2787
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2787
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Broker
>            Reporter: Michael Andre Pearce
>            Priority: Major
>          Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> There are a number of scenarios where it can be useful to disable a queue, so 
> messages are not routed to it.
> 1) An issue that requires investigation but you wish to keep the consumers 
> active, but do not wish to have message build up on the broker
>  
> 2) you want to connect consumers to a address, but you do not wish the flow 
> to start and wish to manage the enablement and disablement centrally.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to