[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=762415&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-762415 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 26/Apr/22 16:37 Start Date: 26/Apr/22 16:37 Worklog Time Spent: 10m Work Description: iliya-gr opened a new pull request, #4054: URL: https://github.com/apache/activemq-artemis/pull/4054 Allow replication only certain addresses with mirror controller. The configuration is similar to cluster address configuration. Issue Time Tracking --- Worklog Id: (was: 762415) Remaining Estimate: 0h Time Spent: 10m > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 10m > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=762452&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-762452 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 26/Apr/22 17:54 Start Date: 26/Apr/22 17:54 Worklog Time Spent: 10m Work Description: clebertsuconic commented on code in PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#discussion_r858997595 ## artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerSource.java: ## @@ -337,4 +368,52 @@ public boolean isMirrorController() { return true; } } + + public static class AddressFilter { + + private final SimpleString[] whiteList; Review Comment: whiteList, blackList are now considered offensive terms... please.. name then allowList, and denyList :) Issue Time Tracking --- Worklog Id: (was: 762452) Time Spent: 20m (was: 10m) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 20m > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=762459&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-762459 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 26/Apr/22 18:04 Start Date: 26/Apr/22 18:04 Worklog Time Spent: 10m Work Description: iliya-gr commented on code in PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#discussion_r859006088 ## artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerSource.java: ## @@ -337,4 +368,52 @@ public boolean isMirrorController() { return true; } } + + public static class AddressFilter { + + private final SimpleString[] whiteList; Review Comment: Thanks for pointing this. We definitely need a maven plugin for this :) Issue Time Tracking --- Worklog Id: (was: 762459) Time Spent: 0.5h (was: 20m) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 0.5h > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=762473&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-762473 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 26/Apr/22 18:38 Start Date: 26/Apr/22 18:38 Worklog Time Spent: 10m Work Description: clebertsuconic commented on PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#issuecomment-111012 it looks good to me... I will not merge it now as the release I'm doing today is named 2.21.1... I will defer it to 2.22.0 in a couple weeks... can you squash these commits and push -f? (git rebase -I, using a fix on the second commit to the first) Issue Time Tracking --- Worklog Id: (was: 762473) Time Spent: 40m (was: 0.5h) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 40m > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=762792&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-762792 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 27/Apr/22 10:45 Start Date: 27/Apr/22 10:45 Worklog Time Spent: 10m Work Description: gemmellr commented on code in PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#discussion_r859618348 ## artemis-server/src/main/resources/schema/artemis-configuration.xsd: ## @@ -2442,6 +2442,13 @@ + + + + name of the address this mirror connection applies to Review Comment: Its not just a simple address name it is taking, so this feels like the wrong attribute name and description. Something conveying the 'filter' nature would seem appropriate. The format of what it does take isnt mentioned , so besides the test usage its unclear how anyone would know. There should be doc updates to e.g https://github.com/apache/activemq-artemis/blob/2.21.0/docs/user-manual/en/amqp-broker-connections.md#mirror-configuration to cover whatever the changes ends up being. Other 'broker connections' stuff such as the sender+receiver already take "address-match" or "queue-match", as shown in the context of the config change in ConfigurationTest-full-config.xml. It would also seem reasonable to align the terminology between them if possible (and perhaps even the syntax and/or implementation; they are implemented a _completely_ different way currently, which doesnt seem that obvious). ## artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerSource.java: ## @@ -337,4 +368,52 @@ public boolean isMirrorController() { return true; } } + + public static class AddressFilter { Review Comment: This seems like it could be private, or just be its own class, rather than being public so that AMQPMirrorControllerSourceTest can use it for testing, without ever testing anything general of AMQPMirrorControllerSource itself. ## tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPReplicaTest.java: ## @@ -473,6 +473,52 @@ public void testNoAddressWithAnnotations() throws Exception { } } + @Test + public void testAddressFilterMet() throws Exception { + addressTest("test", true, 0); Review Comment: Using a 0 wait seems potentially susceptible to failure, as the mirroring isnt synchronous. I know its only checking for > 0 messages being mirrored, but I'd still make it more robust personally. Perhaps just changing it to wait for them all to be mirrored as we do expect them to quickly be. Actually, no need for sending 200 messages either given it doesnt actually look at any of them, sending a couple is enough, and it should look. I would also remove the 1 second wait in the 'no match' case and replace it with better verification by other means, e.g monitor the mirroring SnF queue having not had any messages added when the send is done, or just nothing being present for that target even when subsequently-sent matching stuff has already been received from the other, or both E.g combine this into one test that sends a non-matching and then matching message in that order and then in the reverse order checks the matching consumer does get a message (receive(timeout)) and the non-matching consumer does not (receiveNoWait) from their respective target queues. Faster and more reliable, verification of what actually happened / actual use. (It could perhaps even monitor the mirror SnF queue during and after, verifying nothing got added to the SnF queue for the non-matching case, and is added for the matching case). Issue Time Tracking --- Worklog Id: (was: 762792) Time Spent: 50m (was: 40m) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 50m > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often me
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=762812&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-762812 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 27/Apr/22 11:41 Start Date: 27/Apr/22 11:41 Worklog Time Spent: 10m Work Description: iliya-gr commented on code in PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#discussion_r859692047 ## artemis-server/src/main/resources/schema/artemis-configuration.xsd: ## @@ -2442,6 +2442,13 @@ + + + + name of the address this mirror connection applies to Review Comment: This is still questionable for me. I don't know what is the better name for this attribute. Because any *-match name will suggest same behavior as in receiver/sender and I suspect that nobody will want to create mirror for each address. I chose this name because it has same meaning as in the cluster configuration and I didn't want to expand terminology. So I am still in doubt. I don't think we should align mirror and receiver/sender filter behavior because they have different use cases. Issue Time Tracking --- Worklog Id: (was: 762812) Time Spent: 1h (was: 50m) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 1h > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=762889&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-762889 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 27/Apr/22 13:56 Start Date: 27/Apr/22 13:56 Worklog Time Spent: 10m Work Description: gemmellr commented on code in PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#discussion_r859833745 ## artemis-server/src/main/resources/schema/artemis-configuration.xsd: ## @@ -2442,6 +2442,13 @@ + + + + name of the address this mirror connection applies to Review Comment: I dont think the use case for this configuration is all that different, in this case its about what things you want to mirror from, vs the others being about what you want to send from or recieve to. An address 'match' for a mirror definition certainly doesnt need to mean 'create a seperate mirror for every address' just because it might mean that for e.g a sender. I also presume it couldnt really mean that given each mirror uses a specific queue named based on its parent broker-connections name. Using *address-match*, *address-pattern(s)*, *address-filter(s)*, or anything to similar effect, all seem equally reasonable and far more appropriate to me than just "address" does for a configuration that generally seems to be expected _not_ to just have a single address in it. I'm not saying the config has to be the same, but I am saying it seems more obvious, and I dont as yet see any compelling reason it should be entirely different when its basically for doing entirely equivalent things, configuring applicable addresses of interest. In any case how it is configured and what it does should be documented. Issue Time Tracking --- Worklog Id: (was: 762889) Time Spent: 1h 10m (was: 1h) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 1h 10m > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=763166&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-763166 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 27/Apr/22 21:54 Start Date: 27/Apr/22 21:54 Worklog Time Spent: 10m Work Description: iliya-gr commented on code in PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#discussion_r860274253 ## artemis-server/src/main/resources/schema/artemis-configuration.xsd: ## @@ -2442,6 +2442,13 @@ + + + + name of the address this mirror connection applies to Review Comment: I agree with all of this, maybe except reusing `address-match`. I think using the same term that has different semantic/behaviour is bad and will lead users to misconfiguration. Anyway, I have opted for `address-filter`, but if there are any objections I can change it to anything else. Issue Time Tracking --- Worklog Id: (was: 763166) Time Spent: 1h 20m (was: 1h 10m) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 1h 20m > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=763493&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-763493 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 28/Apr/22 13:02 Start Date: 28/Apr/22 13:02 Worklog Time Spent: 10m Work Description: gemmellr commented on code in PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#discussion_r860822346 ## docs/user-manual/en/amqp-broker-connections.md: ## @@ -100,6 +100,26 @@ Add a `` element within the `` element to configure mir The following optional arguments can be utilized: +* `address-filter`: Each amqp connection mirror configuration only applies to addresses (and its queues) that match the specified `address-filter` attribute, that is, mirroring events will only be sent to the target broker for addresses that match this filter. + An address is matched on the mirror amqp connection when it begins with the string specified in this field. The `address-filters` attribute on a mirror amqp connection also supports comma separated lists and an exclude syntax `!`. + To prevent an address from being matched on this mirror amqp connection, prepend an address string with `!`. If this attribute is not specified, then all addresses and their queues will be mirrored. Review Comment: ```suggestion * `address-filter`: An optional comma-separated list of inclusion and/or exclusion filter entries used to govern which addresses (and related queues) mirroring events will be created for on this broker-connection. That is, events will only be mirrored to the target broker for addresses that match the filter. An address is matched when it begins with an inclusion entry specified in this field, unless the address is also explicitly excluded by another entry. An exclusion entry is prefixed with `!` to denote any address beginning with that value does not match. If no inclusion entry is specified in the list, all addresses not explicitly excluded will match. If the address-filter attribute is not specified, then all addresses (and related queues) will match and be mirrored. ``` ## tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPReplicaTest.java: ## @@ -473,6 +473,73 @@ public void testNoAddressWithAnnotations() throws Exception { } } + @Test + public void testAddressFilter() throws Exception { + server.start(); + + server_2 = createServer(AMQP_PORT_2, false); + server_2.setIdentity("server_2"); + server_2.getConfiguration().setName("server_2"); + + AMQPBrokerConnectConfiguration amqpConnection = new AMQPBrokerConnectConfiguration("mirror-source", "tcp://localhost:" + AMQP_PORT).setReconnectAttempts(-1).setRetryInterval(100); + AMQPMirrorBrokerConnectionElement replica = new AMQPMirrorBrokerConnectionElement().setDurable(true).setAddressFilter("replicated,!nonReplicated"); + amqpConnection.addElement(replica); + server_2.getConfiguration().addAMQPConnection(amqpConnection); + + server_2.start(); + + { + // Send to nonReplicated address + ConnectionFactory factory = CFUtil.createConnectionFactory("AMQP", "tcp://localhost:" + AMQP_PORT_2); + Connection connection = factory.createConnection(); + Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); + MessageProducer producer = session.createProducer(session.createQueue("nonReplicated")); + producer.setDeliveryMode(DeliveryMode.PERSISTENT); + producer.send(session.createTextMessage("never receive")); + connection.close(); + } + + // Check nothing was added to SnF queue + Assert.assertEquals(0, server_2.locateQueue(replica.getMirrorSNF()).getMessagesAdded()); + + { + // Send to replicated address + ConnectionFactory factory = CFUtil.createConnectionFactory("AMQP", "tcp://localhost:" + AMQP_PORT_2); + Connection connection = factory.createConnection(); + Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); + MessageProducer producer = session.createProducer(session.createQueue("replicated")); + producer.setDeliveryMode(DeliveryMode.PERSISTENT); + producer.send(session.createTextMessage("will receive")); Review Comment: Defining a variable or constnat would make it nicer, and easier to see the relation to the assertion. ## tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPReplicaTest.java: ## @@ -473,6 +473,73 @@ public void testNoAddressWithAnnotations() throws Exception { } } + @Test + public void testAddressFilter() throws Exception { + server
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=763494&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-763494 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 28/Apr/22 13:06 Start Date: 28/Apr/22 13:06 Worklog Time Spent: 10m Work Description: gemmellr commented on code in PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#discussion_r860865963 ## docs/user-manual/en/amqp-broker-connections.md: ## @@ -100,6 +100,26 @@ Add a `` element within the `` element to configure mir The following optional arguments can be utilized: +* `address-filter`: Each amqp connection mirror configuration only applies to addresses (and its queues) that match the specified `address-filter` attribute, that is, mirroring events will only be sent to the target broker for addresses that match this filter. + An address is matched on the mirror amqp connection when it begins with the string specified in this field. The `address-filters` attribute on a mirror amqp connection also supports comma separated lists and an exclude syntax `!`. + To prevent an address from being matched on this mirror amqp connection, prepend an address string with `!`. If this attribute is not specified, then all addresses and their queues will be mirrored. Review Comment: I would also possibly suggest moving the `address-filter` option down below the others, as they are relatively tiny by comparison. Issue Time Tracking --- Worklog Id: (was: 763494) Time Spent: 1h 40m (was: 1.5h) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 1h 40m > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=763572&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-763572 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 28/Apr/22 15:07 Start Date: 28/Apr/22 15:07 Worklog Time Spent: 10m Work Description: iliya-gr commented on code in PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#discussion_r861006446 ## tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPReplicaTest.java: ## @@ -473,6 +473,73 @@ public void testNoAddressWithAnnotations() throws Exception { } } + @Test + public void testAddressFilter() throws Exception { + server.start(); + + server_2 = createServer(AMQP_PORT_2, false); + server_2.setIdentity("server_2"); + server_2.getConfiguration().setName("server_2"); + + AMQPBrokerConnectConfiguration amqpConnection = new AMQPBrokerConnectConfiguration("mirror-source", "tcp://localhost:" + AMQP_PORT).setReconnectAttempts(-1).setRetryInterval(100); + AMQPMirrorBrokerConnectionElement replica = new AMQPMirrorBrokerConnectionElement().setDurable(true).setAddressFilter("replicated,!nonReplicated"); + amqpConnection.addElement(replica); + server_2.getConfiguration().addAMQPConnection(amqpConnection); + + server_2.start(); + + { + // Send to nonReplicated address + ConnectionFactory factory = CFUtil.createConnectionFactory("AMQP", "tcp://localhost:" + AMQP_PORT_2); + Connection connection = factory.createConnection(); + Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); + MessageProducer producer = session.createProducer(session.createQueue("nonReplicated")); + producer.setDeliveryMode(DeliveryMode.PERSISTENT); + producer.send(session.createTextMessage("never receive")); + connection.close(); + } + + // Check nothing was added to SnF queue + Assert.assertEquals(0, server_2.locateQueue(replica.getMirrorSNF()).getMessagesAdded()); + + { + // Send to replicated address + ConnectionFactory factory = CFUtil.createConnectionFactory("AMQP", "tcp://localhost:" + AMQP_PORT_2); + Connection connection = factory.createConnection(); + Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); + MessageProducer producer = session.createProducer(session.createQueue("replicated")); + producer.setDeliveryMode(DeliveryMode.PERSISTENT); + producer.send(session.createTextMessage("will receive")); + connection.close(); + } + + // Check some messages were sent to SnF queue + Assert.assertTrue(server_2.locateQueue(replica.getMirrorSNF()).getMessagesAdded() > 0); + + { + ConnectionFactory factory = CFUtil.createConnectionFactory("AMQP", "tcp://localhost:" + AMQP_PORT); + Connection connection = factory.createConnection(); + Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); + connection.start(); + MessageConsumer consumer = session.createConsumer(session.createQueue("replicated")); + Message message = consumer.receive(3000); + Assert.assertNotNull(message); + Assert.assertEquals("will receive", message.getBody(String.class)); + connection.close(); + } + + { + ConnectionFactory factory = CFUtil.createConnectionFactory("AMQP", "tcp://localhost:" + AMQP_PORT); + Connection connection = factory.createConnection(); + Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); + connection.start(); + MessageConsumer consumer = session.createConsumer(session.createQueue("replicated")); Review Comment: Indeed, it should be `nonReplicated`. I have added double send to prevent such mistype. Issue Time Tracking --- Worklog Id: (was: 763572) Time Spent: 1h 50m (was: 1h 40m) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 1h 50m > Remaining Estimate: 0h > > If a target broker of mirroring is in a clus
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=763577&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-763577 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 28/Apr/22 15:08 Start Date: 28/Apr/22 15:08 Worklog Time Spent: 10m Work Description: iliya-gr commented on code in PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#discussion_r861007512 ## tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPReplicaTest.java: ## @@ -473,6 +473,73 @@ public void testNoAddressWithAnnotations() throws Exception { } } + @Test + public void testAddressFilter() throws Exception { + server.start(); + + server_2 = createServer(AMQP_PORT_2, false); + server_2.setIdentity("server_2"); + server_2.getConfiguration().setName("server_2"); + + AMQPBrokerConnectConfiguration amqpConnection = new AMQPBrokerConnectConfiguration("mirror-source", "tcp://localhost:" + AMQP_PORT).setReconnectAttempts(-1).setRetryInterval(100); + AMQPMirrorBrokerConnectionElement replica = new AMQPMirrorBrokerConnectionElement().setDurable(true).setAddressFilter("replicated,!nonReplicated"); + amqpConnection.addElement(replica); + server_2.getConfiguration().addAMQPConnection(amqpConnection); + + server_2.start(); + + { + // Send to nonReplicated address + ConnectionFactory factory = CFUtil.createConnectionFactory("AMQP", "tcp://localhost:" + AMQP_PORT_2); + Connection connection = factory.createConnection(); + Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); + MessageProducer producer = session.createProducer(session.createQueue("nonReplicated")); + producer.setDeliveryMode(DeliveryMode.PERSISTENT); + producer.send(session.createTextMessage("never receive")); + connection.close(); + } Review Comment: Everything is in try-with-resources block now. Issue Time Tracking --- Worklog Id: (was: 763577) Time Spent: 2h (was: 1h 50m) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 2h > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=764318&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-764318 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 29/Apr/22 15:58 Start Date: 29/Apr/22 15:58 Worklog Time Spent: 10m Work Description: gemmellr commented on code in PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#discussion_r861671176 ## tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPReplicaTest.java: ## @@ -473,6 +473,69 @@ public void testNoAddressWithAnnotations() throws Exception { } } + @Test + public void testAddressFilter() throws Exception { + String REPLICATED = "replicated"; + String NON_REPLICATED = "nonReplicated"; + String ADDRESS_FILTER = REPLICATED + "," + "!" + NON_REPLICATED; Review Comment: Might as well add final if using the caps. ## tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPReplicaTest.java: ## @@ -473,6 +473,69 @@ public void testNoAddressWithAnnotations() throws Exception { } } + @Test + public void testAddressFilter() throws Exception { + String REPLICATED = "replicated"; + String NON_REPLICATED = "nonReplicated"; + String ADDRESS_FILTER = REPLICATED + "," + "!" + NON_REPLICATED; + + server.start(); + + server_2 = createServer(AMQP_PORT_2, false); + server_2.setIdentity("server_2"); + server_2.getConfiguration().setName("server_2"); + + AMQPBrokerConnectConfiguration amqpConnection = new AMQPBrokerConnectConfiguration("mirror-source", "tcp://localhost:" + AMQP_PORT).setReconnectAttempts(-1).setRetryInterval(100); + AMQPMirrorBrokerConnectionElement replica = new AMQPMirrorBrokerConnectionElement().setDurable(true).setAddressFilter(ADDRESS_FILTER); + amqpConnection.addElement(replica); + server_2.getConfiguration().addAMQPConnection(amqpConnection); + + server_2.start(); + + try (Connection connection = CFUtil.createConnectionFactory("AMQP", "tcp://localhost:" + AMQP_PORT_2).createConnection()) { + Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); + + // Send to non replicated address + try (MessageProducer producer = session.createProducer(session.createQueue(NON_REPLICATED))) { +producer.setDeliveryMode(DeliveryMode.PERSISTENT); +for (int i = 0; i < 2; i++) { + producer.send(session.createTextMessage("never receive")); +} + } + + // Check nothing was added to SnF queue + Assert.assertEquals(0, server_2.locateQueue(replica.getMirrorSNF()).getMessagesAdded()); + + // Send to replicated address + try (MessageProducer producer = session.createProducer(session.createQueue(REPLICATED))) { +producer.setDeliveryMode(DeliveryMode.PERSISTENT); +for (int i = 0; i < 2; i++) { + producer.send(session.createTextMessage("will receive")); +} Review Comment: As before, and like the queue/address names, using a variable / constant for the payload here and in the assertion would be good to make things clearer. ## artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerSource.java: ## @@ -208,6 +229,10 @@ public void sendMessage(Message message, RoutingContext context, Listhttp://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.artemis.protocol.amqp.connect.mirror; + +import java.util.HashSet; +import java.util.Set; + +import org.apache.activemq.artemis.api.core.SimpleString; + +public class MirrorAddressFilter { + + private final SimpleString[] allowList; + + private final SimpleString[] denyList; + + public MirrorAddressFilter(String address) { Review Comment: address -> filter Issue Time Tracking --- Worklog Id: (was: 764318) Time Spent: 2h 10m (was: 2h) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 >
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=765282&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-765282 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 03/May/22 04:12 Start Date: 03/May/22 04:12 Worklog Time Spent: 10m Work Description: clebertsuconic commented on PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#issuecomment-1115724471 I will spend some time reviewing this tomorrow after I finish the release on 2.22. it seems in good shape. Issue Time Tracking --- Worklog Id: (was: 765282) Time Spent: 2h 20m (was: 2h 10m) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 2h 20m > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=765677&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-765677 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 03/May/22 19:47 Start Date: 03/May/22 19:47 Worklog Time Spent: 10m Work Description: iliya-gr commented on PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#issuecomment-1116497576 > I will spend some time reviewing this tomorrow after I finish the release on 2.22. Do I need to squash commits before? Issue Time Tracking --- Worklog Id: (was: 765677) Time Spent: 2.5h (was: 2h 20m) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 2.5h > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=765902&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-765902 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 04/May/22 09:44 Start Date: 04/May/22 09:44 Worklog Time Spent: 10m Work Description: gemmellr commented on code in PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#discussion_r864642643 ## artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerSource.java: ## @@ -208,6 +232,13 @@ public void sendMessage(Message message, RoutingContext context, List Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 2h 40m > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=765905&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-765905 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 04/May/22 09:46 Start Date: 04/May/22 09:46 Worklog Time Spent: 10m Work Description: gemmellr commented on PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#issuecomment-1117121572 > > I will spend some time reviewing this tomorrow after I finish the release on 2.22. > > Do I need to squash commits before? It can be reviewed without squashing them but its never going to be merged like this without squashing, so I'd suggest just doing so. Issue Time Tracking --- Worklog Id: (was: 765905) Time Spent: 2h 50m (was: 2h 40m) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 2h 50m > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=765923&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-765923 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 04/May/22 11:04 Start Date: 04/May/22 11:04 Worklog Time Spent: 10m Work Description: iliya-gr commented on code in PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#discussion_r864707438 ## artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerSource.java: ## @@ -208,6 +232,13 @@ public void sendMessage(Message message, RoutingContext context, List Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 3h > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=766375&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-766375 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 05/May/22 01:25 Start Date: 05/May/22 01:25 Worklog Time Spent: 10m Work Description: clebertsuconic commented on PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#issuecomment-1118080111 this looks awesome.. merging it. Issue Time Tracking --- Worklog Id: (was: 766375) Time Spent: 3h 10m (was: 3h) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 3h 10m > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=766376&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-766376 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 05/May/22 01:25 Start Date: 05/May/22 01:25 Worklog Time Spent: 10m Work Description: clebertsuconic commented on PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#issuecomment-1118080195 thanks @iliya-gr and @gemmellr Issue Time Tracking --- Worklog Id: (was: 766376) Time Spent: 3h 20m (was: 3h 10m) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 3h 20m > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=766377&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-766377 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 05/May/22 01:26 Start Date: 05/May/22 01:26 Worklog Time Spent: 10m Work Description: clebertsuconic merged PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054 Issue Time Tracking --- Worklog Id: (was: 766377) Time Spent: 3.5h (was: 3h 20m) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 3.5h > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=767188&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-767188 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 06/May/22 13:14 Start Date: 06/May/22 13:14 Worklog Time Spent: 10m Work Description: gemmellr commented on PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#issuecomment-1119604952 Just to be sure; you didnt have any concerns with the different broker-connections bits having a completely different forms of governing applicable addresses? Issue Time Tracking --- Worklog Id: (was: 767188) Time Spent: 3h 40m (was: 3.5h) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 3h 40m > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=767198&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-767198 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 06/May/22 13:34 Start Date: 06/May/22 13:34 Worklog Time Spent: 10m Work Description: iliya-gr commented on PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#issuecomment-1119629490 Sorry, didn't understand your question. Do you mean wildcard settings? Can you explain in details? Issue Time Tracking --- Worklog Id: (was: 767198) Time Spent: 3h 50m (was: 3h 40m) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 3h 50m > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=767225&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-767225 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 06/May/22 14:21 Start Date: 06/May/22 14:21 Worklog Time Spent: 10m Work Description: gemmellr commented on PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#issuecomment-1119676704 The question was for @clebertsuconic, about the long discussion we already had, where I said it is not obvious to me that two broker-connection elements (which could even be on the same broker-connection at this point) should have completely different ways for doing what is largely the same thing, governing the applicable addresses. Issue Time Tracking --- Worklog Id: (was: 767225) Time Spent: 4h (was: 3h 50m) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 4h > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=767300&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-767300 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 06/May/22 16:30 Start Date: 06/May/22 16:30 Worklog Time Spent: 10m Work Description: clebertsuconic commented on PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#issuecomment-1119793573 @gemmellr can we have a separate discussion on that? I missed it... and I'm not sure I understand it. are you concerned with users messing up the config and having two connections filtering the same address? Issue Time Tracking --- Worklog Id: (was: 767300) Time Spent: 4h 10m (was: 4h) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 4h 10m > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (ARTEMIS-3759) Allow for Mirroring (Broker Connections) to specify a specific set of addresses to send events, as is done for a cluster connection
[ https://issues.apache.org/jira/browse/ARTEMIS-3759?focusedWorklogId=767305&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-767305 ] ASF GitHub Bot logged work on ARTEMIS-3759: --- Author: ASF GitHub Bot Created on: 06/May/22 16:43 Start Date: 06/May/22 16:43 Worklog Time Spent: 10m Work Description: gemmellr commented on PR #4054: URL: https://github.com/apache/activemq-artemis/pull/4054#issuecomment-1119804229 Not that, although I guess its possible. Mostly it just seems bizarre for elements of the same thing (a broker connection) to support such entirely distinct ways of doing what amounts to almost exactly the same thing (configuring the applicable addresses). One way supports a list of entries, the other doesnt. One supports wildcarding, the other doesnt. One supports exclusions, the other doesnt. Issue Time Tracking --- Worklog Id: (was: 767305) Time Spent: 4h 20m (was: 4h 10m) > Allow for Mirroring (Broker Connections) to specify a specific set of > addresses to send events, as is done for a cluster connection > - > > Key: ARTEMIS-3759 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3759 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: AMQP >Affects Versions: 2.19.1, 2.21.0 >Reporter: Mikhail Lukyanov >Priority: Major > Attachments: ImageAddressSyntax.png, ImageInternalQueues.png > > Time Spent: 4h 20m > Remaining Estimate: 0h > > If a target broker of mirroring is in a cluster, then mirroring of the > broker's internal queues also occurs, and often messages accumulate in such > queues. In theory, internal cluster queues should not be mirrored, this does > not make much sense. > Therefore, it would be convenient to allow you to configure for which > addresses and their queues mirroring will be performed, events will be sent > (message-acknowledgements, queue-removal, queue-creation). The syntax that is > used to specify the *_addresses_* of the *_cluster connection_* is well > suited for this. > Mirrored internal cluster queues > !ImageInternalQueues.png! > Address syntax > !ImageAddressSyntax.png! -- This message was sent by Atlassian Jira (v8.20.7#820007)