You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/07/04 21:02:00 UTC

[jira] [Work logged] (ARTEMIS-3343) duplicate address-setting gets lost

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

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

                Author: ASF GitHub Bot
            Created on: 04/Jul/21 21:01
            Start Date: 04/Jul/21 21:01
    Worklog Time Spent: 10m 
      Work Description: jbertram commented on a change in pull request #3620:
URL: https://github.com/apache/activemq-artemis/pull/3620#discussion_r663556203



##########
File path: artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationParserTest.java
##########
@@ -95,6 +95,22 @@ public void testDuplicateQueue() throws Exception {
       assertEquals(0, server.locateQueue(SimpleString.toSimpleString("q")).getMaxConsumers());
    }
 
+   @Test
+   public void testDuplicateAddressSettings() throws Exception {
+      String filename = "FileConfigurationParser-duplicateAddressSettings.xml";
+      FileConfiguration fc = new FileConfiguration();
+      FileDeploymentManager deploymentManager = new FileDeploymentManager(filename);
+      deploymentManager.addDeployable(fc);
+      try {
+         deploymentManager.readConfiguration();

Review comment:
       @clebertsuconic, I've updated the code to just log a WARN and ignore the settings from the duplicate match.




-- 
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.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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

> duplicate address-setting gets lost
> -----------------------------------
>
>                 Key: ARTEMIS-3343
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3343
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: 2.17.0
>            Reporter: Erwin Dondorp
>            Priority: Major
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> In setting file {{broker.xml}}, it is possible to register multiple {{address-setting}} blocks for the same {{match}}. But because these blocks are put in a {{Map}} (in {{org.apache.activemq.artemis.core.deployers.impl.parseAddressSettings()}}), any previous block with the same {{match}} will be effectively ignored.
> This may also happen for some of the other named blocks.
> My suggestion is to raise an error when configuration information is lost.



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