[
https://issues.apache.org/jira/browse/ARTEMIS-3343?focusedWorklogId=611594&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-611594
]
ASF GitHub Bot logged work on ARTEMIS-3343:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 15/Jun/21 21:06
Start Date: 15/Jun/21 21:06
Worklog Time Spent: 10m
Work Description: clebertsuconic commented on a change in pull request
#3620:
URL: https://github.com/apache/activemq-artemis/pull/3620#discussion_r652150286
##########
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:
@jbertram
I think the right thing would be to throw the error like you're doing.. by
the other hand.. I have seen some installations where the user has 100s of
destinations configured.. and it will be quite possible to have a duplicate on
those...
Considering what I have seen some users doing, I think it would be wise to
log.warn instead...
I have been using a pattern with ("****** 127 stars
*****\nMYMESSAGE-GOES-HERE\n****127 stars ****") on places I really want to
call the user's attention... (don't know if that's cheesy or not.. but it
certainly catches an eye on logging).. I think we could do something like
this...
WDYT?
--
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: 611594)
Time Spent: 1h 40m (was: 1.5h)
> 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: 1h 40m
> 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)