You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2022/03/22 13:37:37 UTC

[activemq-artemis] branch main updated: ARTEMIS-3710 Deprecate queues config element

This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new 41463c8  ARTEMIS-3710 Deprecate queues config element
41463c8 is described below

commit 41463c83971172955a270572a37ef375c596b0de
Author: Domenico Francesco Bruscino <br...@apache.org>
AuthorDate: Mon Mar 21 06:32:32 2022 +0100

    ARTEMIS-3710 Deprecate queues config element
---
 .../deployers/impl/FileConfigurationParser.java    |  1 +
 .../artemis/core/server/ActiveMQServerLogger.java  |  3 +
 .../resources/schema/artemis-configuration.xsd     |  2 +-
 docs/user-manual/en/config-reload.md               | 65 ++++++++--------------
 4 files changed, 27 insertions(+), 44 deletions(-)

diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
index 26fbcbc..413cc54 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
@@ -991,6 +991,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
    private void parseQueues(final Element e, final Configuration config) {
       NodeList elements = e.getElementsByTagName("queues");
       if (elements.getLength() != 0) {
+         ActiveMQServerLogger.LOGGER.queuesElementDeprecated();
          Element node = (Element) elements.item(0);
          config.setQueueConfigs(parseQueueConfigurations(node, ActiveMQDefaultConfiguration.DEFAULT_ROUTING_TYPE));
       }
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
index 690187d..5568ea1 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
@@ -1769,6 +1769,9 @@ public interface ActiveMQServerLogger extends BasicLogger {
       format = Message.Format.MESSAGE_FORMAT)
    void failedToLoadPreparedTX(@Cause Throwable e, String message);
 
+   @LogMessage(level = Logger.Level.WARN)
+   @Message(id = 222307, value = "The queues element is deprecated and replaced by the addresses element")
+   void queuesElementDeprecated();
 
 
 
diff --git a/artemis-server/src/main/resources/schema/artemis-configuration.xsd b/artemis-server/src/main/resources/schema/artemis-configuration.xsd
index 179e080..33fb5a3 100644
--- a/artemis-server/src/main/resources/schema/artemis-configuration.xsd
+++ b/artemis-server/src/main/resources/schema/artemis-configuration.xsd
@@ -516,7 +516,7 @@
          <xsd:element name="queues" maxOccurs="1" minOccurs="0">
             <xsd:annotation>
                <xsd:documentation>
-                  a list of pre configured queues to create
+                  DEPRECATED: a list of pre configured queues to create
                </xsd:documentation>
             </xsd:annotation>
             <xsd:complexType>
diff --git a/docs/user-manual/en/config-reload.md b/docs/user-manual/en/config-reload.md
index fdecb3c..07e04d0 100644
--- a/docs/user-manual/en/config-reload.md
+++ b/docs/user-manual/en/config-reload.md
@@ -212,14 +212,13 @@ Operation | Add | Delete | Update
 `<address>` | A new address will be deployed in the running broker | The corresponding address will be undeployed. | N/A
 attribute `name` | N/A | X | After reloading the address of the old name will be undeployed and the new will be deployed.
 `<anycast>` | X(no more than one is present) | The anycast routing type will be undeployed from this address, as well as its containing queues after reloading | N/A
-`<queue>`(under `<anycast>`) | An anycast queue will be deployed after reloading | The anycast queue will be undeployed | For updating queues please see next section `<queues>`
+`<queue>`(under `<anycast>`) | An anycast queue will be deployed after reloading | The anycast queue will be undeployed | For updating queues please see next section `<queue>`
 `<multicast>` | X(no more than one is present) | The multicast routing type will be undeployed from this address, as well as its containing queues after reloading | N/A
-`<queue>`(under `<multicast>`) | A multicast queue will be deployed after reloading | The multicast queue will be undeployed | For updating queues please see next section `<queues>`
+`<queue>`(under `<multicast>`) | A multicast queue will be deployed after reloading | The multicast queue will be undeployed | For updating queues please see next section `<queue>`
 
-#### `<queues>`
+#### `<queue>`
 
-The `<queues>` element contains a list `<queue>` elements. Once changed, all
-`<queue>` elements in `<queues>` will be reloaded.
+Changes to any `<queue>` elements will be reloaded to the running broker.
 
 > **Note:**
 >
@@ -234,52 +233,32 @@ The `<queues>` element contains a list `<queue>` elements. Once changed, all
 > `config-delete-queues` as described in this doc.
 
 Below lists the effects of adding, deleting and updating of an
-element/attribute within the `<queues>` element, and whether a change can be
+element/attribute within the `<queue>` element, and whether a change can be
 done or can’t be done.
 
 Operation | Add | Delete | Update
 ---|---|---|---
-`<queues>` | X(no more than one is present) | Deleting it means delete  (undeploy) all queues from running broker. | N/A
 `<queue>` | A new queue is deployed after reloading | The queue will be undeployed after reloading. | N/A
 attribute `name` | N/A | X | A queue with new name will be deployed and the queue with old name will be updeployed after reloading (see Note above).
 attribute `max-consumers` | If max-consumers > current consumers max-consumers will update on reload | max-consumers will be set back to the default `-1` | If max-consumers > current consumers max-consumers will update on reload
 attribute `purge-on-no-consumers` | On reload purge-on-no-consumers will be updated | Will be set back to the default `false` | On reload purge-on-no-consumers will be updated
-attribute `address` | N/A | No effect unless starting broker | No effect unless starting broker
-attribute `filter` | The filter will be added after reloading | The filter will be removed after reloading | The filter will be updated after reloading
-attribute `durable` | The queue durability will be set to the given value after reloading | The queue durability will be set to the default `true` after reloading | The queue durability will be set to the new value after reloading
-
-### `<jms>` *(Deprecated)*
-
-#### `<queue>`
-
-Changes to any `<queue>` elements will be reloaded to the running broker.
-
-> **Note:**
->
-> Once reloaded, new queues defined in the new changes will be deployed to the
-> running broker. However existing queues won’t get undeployed even if the
-> matching element is deleted/missing. Also new queue elements matching
-> existing queues won’t get re-created – they remain unchanged.
-
-Operation | Add | Delete | Update
----|---|---|---
-`<queue>` | A new jms queue will be deployed after reloading | No effect unless starting broker | No effect unless starting broker
-attribute `<name>` | N/A | X | A jms queue of the new name will be deployed after reloading
-`<selector>` | X(no more than one is present) | No effect unless starting broker | No effect unless starting broker
-`<durable>` | X(no more than one is present) | No effect unless starting broker | No effect unless starting broker
-
-#### `<topic>`
+attribute `enabled` | On reload enabled will be updated | Will be set back to the default `true` | On reload enabled will be updated
+attribute `exclusive` | On reload exclusive will be updated | Will be set back to the default `false` | On reload exclusive will be updated
+attribute `group-rebalance` | On reload group-rebalance will be updated | Will be set back to the default `false` | On reload group-rebalance will be updated
+attribute `group-rebalance-pause-dispatch` | On reload group-rebalance-pause-dispatch will be updated | Will be set back to the default `false` | On reload group-rebalance-pause-dispatch will be updated
+attribute `group-buckets` | On reload group-buckets will be updated | Will be set back to the default `-1` | On reload group-buckets will be updated
+attribute `group-first-key` | On reload group-first-key will be updated | Will be set back to the default `null` | On reload group-first-key will be updated
+attribute `last-value` | On reload last-value will be updated | Will be set back to the default `false` | On reload last-value will be updated
+attribute `last-value-key` | On reload last-value-key will be updated | Will be set back to the default `null` | On reload last-value-key will be updated
+attribute `non-destructive` | On reload non-destructive will be updated | Will be set back to the default `false` | On reload non-destructive will be updated
+attribute `consumers-before-dispatch` | On reload consumers-before-dispatch will be updated | Will be set back to the default `0` | On reload consumers-before-dispatch will be updated
+attribute `delay-before-dispatch` | On reload delay-before-dispatch will be updated | Will be set back to the default `-1` | On reload delay-before-dispatch will be updated
+attribute `ring-size` | On reload ring-size will be updated | Will be set back to the default `-1` | On reload ring-size will be updated
+`<filter>` | The filter will be added after reloading | The filter will be removed after reloading | The filter will be updated after reloading
+`<durable>` | The queue durability will be set to the given value after reloading | The queue durability will be set to the default `true` after reloading | The queue durability will be set to the new value after reloading
+`<user>` | The queue user will be set to the given value after reloading | The queue user will be set to the default `null` after reloading | The queue user will be set to the new value after reloading
 
-Changes to any `<topic>` elements will be reloaded to the running broker.
 
-> **Note:**
->
-> Once reloaded, new topics defined in the new changes will be deployed to the
-> running broker. However existing topics won’t get undeployed even if the
-> matching element is deleted/missing. Also any `<topic>` elements matching
-> existing topics won’t get re-deployed – they remain unchanged.
+### `<jms>` *(Deprecated)*
 
-Operation | Add | Delete | Update
----|---|---|---
-`<topic>` | A new jms topic will be deployed after reloading | No effect unless starting broker | No effect unless starting broker
-attribute `name` | N/A | X | A jms topic of the new name will be deployed after reloading
+### `<queues>` *(Deprecated)*