[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=325878&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-325878 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 09/Oct/19 19:13 Start Date: 09/Oct/19 19:13 Worklog Time Spent: 10m Work Description: jbertram commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-540147310 @michaelandrepearce, try it now. I eliminated the copy when populating the new queue with the old messages. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 325878) Time Spent: 6h 10m (was: 6h) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Time Spent: 6h 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=326149&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-326149 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 10/Oct/19 07:09 Start Date: 10/Oct/19 07:09 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-540423943 @jbertram im busy this week with some priority bits at work, thus also not had time tonrespin the amqp nms release. Im hoping to get time next week to look at this again 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 326149) Time Spent: 6h 20m (was: 6h 10m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Time Spent: 6h 20m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=328019&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-328019 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 14/Oct/19 17:50 Start Date: 14/Oct/19 17:50 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-541822492 So im getting odd behaviour after restarts. Trying to work out what is going on. Have you done much destructive testing on this? 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 328019) Time Spent: 6.5h (was: 6h 20m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Time Spent: 6.5h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=328020&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-328020 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 14/Oct/19 17:51 Start Date: 14/Oct/19 17:51 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-541822492 So im getting odd behaviour after restarts and failovers. Trying to work out what is going on. Have you done much destructive testing on this? 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 328020) Time Spent: 6h 40m (was: 6.5h) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Time Spent: 6h 40m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=328068&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-328068 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 14/Oct/19 19:14 Start Date: 14/Oct/19 19:14 Worklog Time Spent: 10m Work Description: jbertram commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-541866699 I'm not sure what you mean by "destructive testing." There are a number of tests on the PR one of which specifically tests restarting the broker, although there aren't any testing failover. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 328068) Time Spent: 6h 50m (was: 6h 40m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Time Spent: 6h 50m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=328380&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-328380 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 15/Oct/19 07:36 Start Date: 15/Oct/19 07:36 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-542081191 I mean running this a little more than just an integration test. E.g. actually deploying to a real environment and do bits like failover, outage, client disconnects 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 328380) Time Spent: 7h (was: 6h 50m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Time Spent: 7h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=328381&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-328381 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 15/Oct/19 07:37 Start Date: 15/Oct/19 07:37 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-542081191 I mean running this a little more than just an integration test. E.g. actually deploying to a real environment and do bits like failover, outage, client disconnects, multiple consumers on a shared address underload and then a new retro consumer 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 328381) Time Spent: 7h 10m (was: 7h) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Time Spent: 7h 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=330124&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-330124 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 17/Oct/19 20:30 Start Date: 17/Oct/19 20:30 Worklog Time Spent: 10m Work Description: jbertram commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-543349109 I added a simple failover test and push. Everything looks OK as far as I can tell. As far as the "destructive testing" you mentioned goes, I've done a bit more than what is captured in the tests, but nothing I could categorize as industrial grade (e.g. no huge loads on big hardware). 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 330124) Time Spent: 7h 20m (was: 7h 10m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Time Spent: 7h 20m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=330125&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-330125 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 17/Oct/19 20:31 Start Date: 17/Oct/19 20:31 Worklog Time Spent: 10m Work Description: jbertram commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-543349109 I added a simple failover test and pushed. Everything looks OK as far as I can tell. As far as the "destructive testing" you mentioned goes, I've done a bit more than what is captured in the tests, but nothing I could categorize as industrial grade (e.g. no huge loads on big hardware). 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 330125) Time Spent: 7.5h (was: 7h 20m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Time Spent: 7.5h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=330166&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-330166 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 17/Oct/19 22:07 Start Date: 17/Oct/19 22:07 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-543381734 No further comments from me atm other bits and bobs can always be added later in future prs /version and refined over time. Thanks for this @jbertram was prob the last big ticket for artemis to be in feature parity with activemq5. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 330166) Time Spent: 7h 40m (was: 7.5h) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Time Spent: 7h 40m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=331411&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-331411 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 21/Oct/19 13:19 Start Date: 21/Oct/19 13:19 Worklog Time Spent: 10m Work Description: clebertsuconic commented on pull request #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#discussion_r337012368 ## File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/AddressSettings.java ## @@ -759,6 +761,15 @@ public AddressSettings setDefaultRingSize(final long defaultRingSize) { return this; } + public long getRetroactiveMessageCount() { + return retroactiveMessageCount != null ? retroactiveMessageCount : ActiveMQDefaultConfiguration.DEFAULT_RETROACTIVE_MESSAGE_COUNT; + } + + public AddressSettings setRetroactiveMessageCount(final long defaultRetroactiveMessageCount) { + this.retroactiveMessageCount = defaultRetroactiveMessageCount; + return this; + } + Review comment: I have tried to add a comment on a line you didn't touch on github and I couldn't figure out how to do it... It seems you missed implementing the merge method here, you also missed implementing the persistence of the new attribute here. So, I think you should add implementation on this new attribute, and you should probably also add tests on loading the new setting. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 331411) Time Spent: 7h 50m (was: 7h 40m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Time Spent: 7h 50m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=334131&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-334131 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 25/Oct/19 13:11 Start Date: 25/Oct/19 13:11 Worklog Time Spent: 10m Work Description: jbertram commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-546347831 @clebertsuconic, I dealt with the address-setting persistence issue and found some other related issues along the way which I've also fixed in another commit. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 334131) Time Spent: 8h (was: 7h 50m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Time Spent: 8h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=334923&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-334923 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 28/Oct/19 13:04 Start Date: 28/Oct/19 13:04 Worklog Time Spent: 10m Work Description: asfgit commented on pull request #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 334923) Time Spent: 8h 10m (was: 8h) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Time Spent: 8h 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=338976&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-338976 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 05/Nov/19 19:59 Start Date: 05/Nov/19 19:59 Worklog Time Spent: 10m Work Description: asfgit commented on pull request #2882: ARTEMIS-2504 fix divert test URL: https://github.com/apache/activemq-artemis/pull/2882 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 338976) Time Spent: 8.5h (was: 8h 20m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Fix For: 2.11.0 > > Time Spent: 8.5h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=338975&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-338975 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 05/Nov/19 19:59 Start Date: 05/Nov/19 19:59 Worklog Time Spent: 10m Work Description: asfgit commented on pull request #2882: ARTEMIS-2504 fix divert test URL: https://github.com/apache/activemq-artemis/pull/2882 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 338975) Time Spent: 8h 20m (was: 8h 10m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Fix For: 2.11.0 > > Time Spent: 8h 20m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=317768&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-317768 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 24/Sep/19 19:10 Start Date: 24/Sep/19 19:10 Worklog Time Spent: 10m Work Description: jbertram commented on pull request #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850 A new feature to preserve messages sent to an address for queues that will be created on the address in the future. This is essentially equivalent to the "retroactive consumer" feature from 5.x. However, it's implemented in a way that fits with the address model of Artemis. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 317768) Remaining Estimate: 0h Time Spent: 10m > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318211&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318211 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 25/Sep/19 10:17 Start Date: 25/Sep/19 10:17 Worklog Time Spent: 10m Work Description: brusdev commented on pull request #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#discussion_r328041981 ## File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java ## @@ -1971,7 +1988,9 @@ private synchronized int iterQueue(final int flushLimit, if (filter1 == null || filter1.match(ref.getMessage())) { messageAction.actMessage(tx, ref); - iter.remove(); + if (remove) { Review comment: Do we need the same check for scheduledDelivery messages (https://github.com/apache/activemq-artemis/blob/master/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerImpl.java#L128) and paged messages (https://github.com/apache/activemq-artemis/blob/master/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java#L2002)? 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 318211) Time Spent: 20m (was: 10m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318664&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318664 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 26/Sep/19 00:04 Start Date: 26/Sep/19 00:04 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-535272144 A few bits as havent fully explored the feature just yet. How does someone control if the retroactive address will behave when full, e.g. page, block, drop? How or where can someone configure the naming of a retroactive address so they can control their names to avoid conflict or for security settings. For a specific address it would be good to be able to configure the retroactive queue fully, eg at the address level define a queue (like we can others) and then specify the queue to use. E.g. for cases where retroactive you may want LVQ behaviour. For queues created for retroactive, if there is a very high number of message groups and someone is using buckets so that the group map doesnt explode in size, how is this being avoided in the retroactive queue? 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 318664) Time Spent: 0.5h (was: 20m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >Assignee: Justin Graham Bertram >Priority: Major > Time Spent: 0.5h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318665&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318665 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 26/Sep/19 00:23 Start Date: 26/Sep/19 00:23 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-535272144 A few bits as havent fully explored the feature just yet. How does someone control if the retroactive address will behave when full, e.g. page, block, drop? How or where can someone configure the naming of a retroactive address so they can control their names to avoid conflict or for security settings. How can we configure this setting differently per address. For a specific address it would be good to be able to configure the retroactive queue fully, eg at the address level define a queue (like we can others) and then specify the queue to use. E.g. for cases where retroactive you may want LVQ behaviour or a filter For queues created for retroactive, if there is a very high number of message groups and someone is using buckets so that the group map doesnt explode in size, how is this being avoided in the retroactive queue? 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 318665) Time Spent: 40m (was: 0.5h) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >Assignee: Justin Graham Bertram >Priority: Major > Time Spent: 40m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318671&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318671 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 26/Sep/19 00:53 Start Date: 26/Sep/19 00:53 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-535272144 A few bits as havent fully explored the feature just yet. How does someone control if the retroactive address will behave when full, e.g. page, block, drop? How or where can someone configure the naming of a retroactive address so they can control their names to avoid conflict or for security settings. How can we configure this setting differently per address. For a specific address it would be good to be able to configure the retroactive queue fully, eg at the address level define a queue (like we can others) and then specify the queue to use. E.g. for cases where retroactive you may want LVQ behaviour or a filter For queues created for retroactive, if there is a very high number of message groups and someone is using buckets so that the group map doesnt explode in size, how is this being avoided in the retroactive queue? Is routing type being preserved. E.g. if a new multicast queue only messages sent to the address as multicast get delivered to it. And like wise anycast. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 318671) Time Spent: 50m (was: 40m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >Assignee: Justin Graham Bertram >Priority: Major > Time Spent: 50m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318672&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318672 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 26/Sep/19 00:57 Start Date: 26/Sep/19 00:57 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-535272144 A few bits as havent fully explored the feature just yet. How does someone control if the retroactive address will behave when full, e.g. page, block, drop? How or where can someone configure the naming of a retroactive address so they can control their names to avoid conflict or for security settings. How can we configure this setting differently per address. For a specific address it would be good to be able to configure the retroactive queue fully, eg at the address level define a queue (like we can others) and then specify the queue to use. E.g. for cases where retroactive you may want LVQ behaviour or a filter For queues created for retroactive, if there is a very high number of message groups and someone is using buckets so that the group map doesnt explode in size, how is this being avoided in the retroactive queue? Is routing type being preserved. E.g. if a new multicast queue only messages sent to the address as multicast get delivered to it. And like wise anycast. Otherwise will cause issues. As normally any anycast message wouldnt have been delivered to multicast queur. But now it could possibly, if its not honoured. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 318672) Time Spent: 1h (was: 50m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >Assignee: Justin Graham Bertram >Priority: Major > Time Spent: 1h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318673&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318673 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 26/Sep/19 00:58 Start Date: 26/Sep/19 00:58 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-535272144 A few bits as havent fully explored the feature just yet. How does someone control if the retroactive address will behave when full, e.g. page, block, drop? How or where can someone configure the naming of a retroactive address so they can control their names to avoid conflict or for security settings. How can we configure this setting differently per address. For a specific address it would be good to be able to configure the retroactive queue fully, eg at the address level define a queue (like we can others) and then specify the queue to use. E.g. for cases where retroactive you may want LVQ behaviour or a filter For queues created for retroactive, if there is a very high number of message groups and someone is using buckets so that the group map doesnt explode in size, how is this being avoided in the retroactive queue? Is routing type being preserved. E.g. if a new multicast queue only messages sent to the address as multicast get delivered to it. And like wise anycast. Otherwise will cause issues. As normally any anycast message wouldnt have been delivered to multicast queue. But now it could possibly, if its not honoured. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 318673) Time Spent: 1h 10m (was: 1h) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >Assignee: Justin Graham Bertram >Priority: Major > Time Spent: 1h 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318676&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318676 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 26/Sep/19 01:06 Start Date: 26/Sep/19 01:06 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on pull request #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#discussion_r328398850 ## File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java ## @@ -467,6 +478,83 @@ private boolean internalAddressInfo(AddressInfo addressInfo, boolean reload) thr } } + private void registerRepositoryListenerForRetroactiveAddress(SimpleString name) { + HierarchicalRepositoryChangeListener repositoryChangeListener = () -> { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + String address = ResourceNames.decomposeRetroactiveResourceName(prefix, name.toString(), ResourceNames.ADDRESS); + AddressSettings settings = addressSettingsRepository.getMatch(address); + Queue internalQueue = server.locateQueue(ResourceNames.getRetroactiveResourceName(prefix, SimpleString.toSimpleString(address), ResourceNames.QUEUE)); + if (internalQueue != null && internalQueue.getRingSize() != settings.getRetroactiveMessageCount()) { +internalQueue.setRingSize(settings.getRetroactiveMessageCount()); + } + }; + addressSettingsRepository.registerListener(repositoryChangeListener); + server.getAddressInfo(name).setRepositoryChangeListener(repositoryChangeListener); + } + + private void createRetroactiveResources(final SimpleString retroactiveAddressName, final long retroactiveMessageCount, final boolean reload) throws Exception { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + final SimpleString internalAddressName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.ADDRESS); + final SimpleString internalQueueName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.QUEUE); + final SimpleString internalDivertName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.DIVERT); + + if (!reload) { + AddressInfo addressInfo = new AddressInfo(internalAddressName).addRoutingType(RoutingType.ANYCAST).setInternal(true); + addAddressInfo(addressInfo); + server.createQueue(internalAddressName, +RoutingType.ANYCAST, +internalQueueName, +null, +null, +true, +false, +false, +false, +false, +0, +false, +false, +false, +0, +null, +false, +null, +false, +0, +0L, +false, +0L, +0L, +false, +retroactiveMessageCount); + } + server.deployDivert(new DivertConfiguration() + .setName(internalDivertName.toString()) + .setAddress(retroactiveAddressName.toString()) + .setExclusive(false) + .setForwardingAddress(internalAddressName.toString()) + .setRoutingType(ComponentConfigurationRoutingType.STRIP)); + } + + private void removeRetroactiveResources(SimpleString address) throws Exception { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + + SimpleString internalDivertName = ResourceNames.getRetroactiveResourceName(prefix, address, ResourceNames.DIVERT); Review comment: Why divert and separate address is needed. Why not have the retro queue under the original address? With having separate address will mean message has to be copied rather than it simply being a message reference to existing message. 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
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318677&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318677 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 26/Sep/19 01:07 Start Date: 26/Sep/19 01:07 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on pull request #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#discussion_r328398850 ## File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java ## @@ -467,6 +478,83 @@ private boolean internalAddressInfo(AddressInfo addressInfo, boolean reload) thr } } + private void registerRepositoryListenerForRetroactiveAddress(SimpleString name) { + HierarchicalRepositoryChangeListener repositoryChangeListener = () -> { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + String address = ResourceNames.decomposeRetroactiveResourceName(prefix, name.toString(), ResourceNames.ADDRESS); + AddressSettings settings = addressSettingsRepository.getMatch(address); + Queue internalQueue = server.locateQueue(ResourceNames.getRetroactiveResourceName(prefix, SimpleString.toSimpleString(address), ResourceNames.QUEUE)); + if (internalQueue != null && internalQueue.getRingSize() != settings.getRetroactiveMessageCount()) { +internalQueue.setRingSize(settings.getRetroactiveMessageCount()); + } + }; + addressSettingsRepository.registerListener(repositoryChangeListener); + server.getAddressInfo(name).setRepositoryChangeListener(repositoryChangeListener); + } + + private void createRetroactiveResources(final SimpleString retroactiveAddressName, final long retroactiveMessageCount, final boolean reload) throws Exception { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + final SimpleString internalAddressName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.ADDRESS); + final SimpleString internalQueueName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.QUEUE); + final SimpleString internalDivertName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.DIVERT); + + if (!reload) { + AddressInfo addressInfo = new AddressInfo(internalAddressName).addRoutingType(RoutingType.ANYCAST).setInternal(true); + addAddressInfo(addressInfo); + server.createQueue(internalAddressName, +RoutingType.ANYCAST, +internalQueueName, +null, +null, +true, +false, +false, +false, +false, +0, +false, +false, +false, +0, +null, +false, +null, +false, +0, +0L, +false, +0L, +0L, +false, +retroactiveMessageCount); + } + server.deployDivert(new DivertConfiguration() + .setName(internalDivertName.toString()) + .setAddress(retroactiveAddressName.toString()) + .setExclusive(false) + .setForwardingAddress(internalAddressName.toString()) + .setRoutingType(ComponentConfigurationRoutingType.STRIP)); + } + + private void removeRetroactiveResources(SimpleString address) throws Exception { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + + SimpleString internalDivertName = ResourceNames.getRetroactiveResourceName(prefix, address, ResourceNames.DIVERT); Review comment: Why divert and separate address is needed. Why not have the retro queue under the original address? With having separate address will mean message has to be copied rather than it simply being a message reference to existing message. Also adds more risk in what if divert or other address dont clean up cleanly etc. 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 g
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318678&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318678 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 26/Sep/19 01:12 Start Date: 26/Sep/19 01:12 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on pull request #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#discussion_r328399892 ## File path: tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/RetroactiveAddressTest.java ## @@ -0,0 +1,287 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://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.tests.integration.server; + +import javax.jms.Connection; +import javax.jms.ConnectionFactory; +import javax.jms.Message; +import javax.jms.MessageConsumer; +import javax.jms.MessageProducer; +import javax.jms.Session; +import javax.jms.Topic; +import java.util.UUID; + +import org.apache.activemq.artemis.api.core.RoutingType; +import org.apache.activemq.artemis.api.core.SimpleString; +import org.apache.activemq.artemis.api.core.client.ClientConsumer; +import org.apache.activemq.artemis.api.core.client.ClientMessage; +import org.apache.activemq.artemis.api.core.client.ClientProducer; +import org.apache.activemq.artemis.api.core.client.ClientSession; +import org.apache.activemq.artemis.api.core.client.ClientSessionFactory; +import org.apache.activemq.artemis.api.core.client.ServerLocator; +import org.apache.activemq.artemis.api.core.management.ResourceNames; +import org.apache.activemq.artemis.core.server.ActiveMQServer; +import org.apache.activemq.artemis.core.server.impl.AddressInfo; +import org.apache.activemq.artemis.core.settings.impl.AddressSettings; +import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.tests.util.Wait; +import org.junit.Before; +import org.junit.Test; + +/** + * A simple test-case used for documentation purposes. + */ +public class RetroactiveAddressTest extends ActiveMQTestBase { + + protected ActiveMQServer server; + + protected ClientSession session; + + protected ClientSessionFactory sf; + + protected ServerLocator locator; + + @Override + @Before + public void setUp() throws Exception { + super.setUp(); + server = createServer(true, createDefaultInVMConfig()); + server.getConfiguration().setThreadPoolMaxSize(200); + server.start(); + locator = createInVMNonHALocator(); + sf = createSessionFactory(locator); + session = addClientSession(sf.createSession(false, true, true)); + } + + @Test + public void testRetroactiveResourceCreation() throws Exception { + final SimpleString addressName = SimpleString.toSimpleString("myAddress"); + final SimpleString divertAddress = ResourceNames.getRetroactiveResourceName(server.getConfiguration().getInternalNamingPrefix(), addressName, ResourceNames.ADDRESS); + final SimpleString divertQueue = ResourceNames.getRetroactiveResourceName(server.getConfiguration().getInternalNamingPrefix(), addressName, ResourceNames.QUEUE); + final SimpleString divert = ResourceNames.getRetroactiveResourceName(server.getConfiguration().getInternalNamingPrefix(), addressName, ResourceNames.DIVERT); + server.getAddressSettingsRepository().addMatch(addressName.toString(), new AddressSettings().setRetroactiveMessageCount(10)); + server.addAddressInfo(new AddressInfo(addressName)); + assertNotNull(server.getAddressInfo(divertAddress)); + assertNotNull(server.locateQueue(divertQueue)); + assertNotNull(server.getPostOffice().getBinding(divert)); + } + + @Test + public void testRetroactiveResourceRemoval() throws Exception { + final SimpleString addressName = SimpleString.toSimpleString("myAddress"); + final SimpleString divertAddress = ResourceNames.getRetroactiveResourceName(server.getConfiguration().getInternalNaming
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318680&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318680 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 26/Sep/19 01:16 Start Date: 26/Sep/19 01:16 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on pull request #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#discussion_r328400519 ## File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java ## @@ -467,6 +478,83 @@ private boolean internalAddressInfo(AddressInfo addressInfo, boolean reload) thr } } + private void registerRepositoryListenerForRetroactiveAddress(SimpleString name) { + HierarchicalRepositoryChangeListener repositoryChangeListener = () -> { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + String address = ResourceNames.decomposeRetroactiveResourceName(prefix, name.toString(), ResourceNames.ADDRESS); + AddressSettings settings = addressSettingsRepository.getMatch(address); + Queue internalQueue = server.locateQueue(ResourceNames.getRetroactiveResourceName(prefix, SimpleString.toSimpleString(address), ResourceNames.QUEUE)); + if (internalQueue != null && internalQueue.getRingSize() != settings.getRetroactiveMessageCount()) { +internalQueue.setRingSize(settings.getRetroactiveMessageCount()); + } + }; + addressSettingsRepository.registerListener(repositoryChangeListener); + server.getAddressInfo(name).setRepositoryChangeListener(repositoryChangeListener); + } + + private void createRetroactiveResources(final SimpleString retroactiveAddressName, final long retroactiveMessageCount, final boolean reload) throws Exception { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + final SimpleString internalAddressName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.ADDRESS); + final SimpleString internalQueueName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.QUEUE); + final SimpleString internalDivertName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.DIVERT); + + if (!reload) { + AddressInfo addressInfo = new AddressInfo(internalAddressName).addRoutingType(RoutingType.ANYCAST).setInternal(true); + addAddressInfo(addressInfo); + server.createQueue(internalAddressName, +RoutingType.ANYCAST, +internalQueueName, +null, +null, +true, +false, +false, +false, +false, +0, +false, +false, +false, +0, +null, +false, +null, +false, +0, +0L, +false, +0L, +0L, +false, +retroactiveMessageCount); + } + server.deployDivert(new DivertConfiguration() + .setName(internalDivertName.toString()) + .setAddress(retroactiveAddressName.toString()) + .setExclusive(false) + .setForwardingAddress(internalAddressName.toString()) + .setRoutingType(ComponentConfigurationRoutingType.STRIP)); Review comment: I dont think we should be stripping. We need to ensure anycast messages only end up in anycast queues and like wise multicast. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 318680) Time Spent: 1h 50m (was: 1h 40m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318681&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318681 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 26/Sep/19 01:17 Start Date: 26/Sep/19 01:17 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on pull request #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#discussion_r328400519 ## File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java ## @@ -467,6 +478,83 @@ private boolean internalAddressInfo(AddressInfo addressInfo, boolean reload) thr } } + private void registerRepositoryListenerForRetroactiveAddress(SimpleString name) { + HierarchicalRepositoryChangeListener repositoryChangeListener = () -> { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + String address = ResourceNames.decomposeRetroactiveResourceName(prefix, name.toString(), ResourceNames.ADDRESS); + AddressSettings settings = addressSettingsRepository.getMatch(address); + Queue internalQueue = server.locateQueue(ResourceNames.getRetroactiveResourceName(prefix, SimpleString.toSimpleString(address), ResourceNames.QUEUE)); + if (internalQueue != null && internalQueue.getRingSize() != settings.getRetroactiveMessageCount()) { +internalQueue.setRingSize(settings.getRetroactiveMessageCount()); + } + }; + addressSettingsRepository.registerListener(repositoryChangeListener); + server.getAddressInfo(name).setRepositoryChangeListener(repositoryChangeListener); + } + + private void createRetroactiveResources(final SimpleString retroactiveAddressName, final long retroactiveMessageCount, final boolean reload) throws Exception { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + final SimpleString internalAddressName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.ADDRESS); + final SimpleString internalQueueName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.QUEUE); + final SimpleString internalDivertName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.DIVERT); + + if (!reload) { + AddressInfo addressInfo = new AddressInfo(internalAddressName).addRoutingType(RoutingType.ANYCAST).setInternal(true); + addAddressInfo(addressInfo); + server.createQueue(internalAddressName, +RoutingType.ANYCAST, +internalQueueName, +null, +null, +true, +false, +false, +false, +false, +0, +false, +false, +false, +0, +null, +false, +null, +false, +0, +0L, +false, +0L, +0L, +false, +retroactiveMessageCount); + } + server.deployDivert(new DivertConfiguration() + .setName(internalDivertName.toString()) + .setAddress(retroactiveAddressName.toString()) + .setExclusive(false) + .setForwardingAddress(internalAddressName.toString()) + .setRoutingType(ComponentConfigurationRoutingType.STRIP)); Review comment: I dont think we should be stripping. We need to ensure anycast messages only end up in anycast queues and like wise multicast. When theyre consumed by a retroactive consumer 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 318681) Time Spent: 2h (was: 1h 50m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis >
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318684&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318684 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 26/Sep/19 01:18 Start Date: 26/Sep/19 01:18 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on pull request #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#discussion_r328400809 ## File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java ## @@ -467,6 +478,83 @@ private boolean internalAddressInfo(AddressInfo addressInfo, boolean reload) thr } } + private void registerRepositoryListenerForRetroactiveAddress(SimpleString name) { + HierarchicalRepositoryChangeListener repositoryChangeListener = () -> { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + String address = ResourceNames.decomposeRetroactiveResourceName(prefix, name.toString(), ResourceNames.ADDRESS); + AddressSettings settings = addressSettingsRepository.getMatch(address); + Queue internalQueue = server.locateQueue(ResourceNames.getRetroactiveResourceName(prefix, SimpleString.toSimpleString(address), ResourceNames.QUEUE)); + if (internalQueue != null && internalQueue.getRingSize() != settings.getRetroactiveMessageCount()) { +internalQueue.setRingSize(settings.getRetroactiveMessageCount()); + } + }; + addressSettingsRepository.registerListener(repositoryChangeListener); + server.getAddressInfo(name).setRepositoryChangeListener(repositoryChangeListener); + } + + private void createRetroactiveResources(final SimpleString retroactiveAddressName, final long retroactiveMessageCount, final boolean reload) throws Exception { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + final SimpleString internalAddressName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.ADDRESS); + final SimpleString internalQueueName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.QUEUE); + final SimpleString internalDivertName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.DIVERT); + + if (!reload) { + AddressInfo addressInfo = new AddressInfo(internalAddressName).addRoutingType(RoutingType.ANYCAST).setInternal(true); + addAddressInfo(addressInfo); + server.createQueue(internalAddressName, +RoutingType.ANYCAST, +internalQueueName, +null, +null, +true, +false, +false, +false, +false, +0, +false, +false, +false, +0, +null, +false, +null, +false, +0, +0L, +false, +0L, +0L, +false, +retroactiveMessageCount); + } + server.deployDivert(new DivertConfiguration() + .setName(internalDivertName.toString()) + .setAddress(retroactiveAddressName.toString()) + .setExclusive(false) + .setForwardingAddress(internalAddressName.toString()) + .setRoutingType(ComponentConfigurationRoutingType.STRIP)); Review comment: It may mean a retro anycast and a retro multicast queue is required to preserve that 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 318684) Time Spent: 2h 20m (was: 2h 10m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318682&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318682 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 26/Sep/19 01:18 Start Date: 26/Sep/19 01:18 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on pull request #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#discussion_r328400809 ## File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java ## @@ -467,6 +478,83 @@ private boolean internalAddressInfo(AddressInfo addressInfo, boolean reload) thr } } + private void registerRepositoryListenerForRetroactiveAddress(SimpleString name) { + HierarchicalRepositoryChangeListener repositoryChangeListener = () -> { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + String address = ResourceNames.decomposeRetroactiveResourceName(prefix, name.toString(), ResourceNames.ADDRESS); + AddressSettings settings = addressSettingsRepository.getMatch(address); + Queue internalQueue = server.locateQueue(ResourceNames.getRetroactiveResourceName(prefix, SimpleString.toSimpleString(address), ResourceNames.QUEUE)); + if (internalQueue != null && internalQueue.getRingSize() != settings.getRetroactiveMessageCount()) { +internalQueue.setRingSize(settings.getRetroactiveMessageCount()); + } + }; + addressSettingsRepository.registerListener(repositoryChangeListener); + server.getAddressInfo(name).setRepositoryChangeListener(repositoryChangeListener); + } + + private void createRetroactiveResources(final SimpleString retroactiveAddressName, final long retroactiveMessageCount, final boolean reload) throws Exception { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + final SimpleString internalAddressName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.ADDRESS); + final SimpleString internalQueueName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.QUEUE); + final SimpleString internalDivertName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.DIVERT); + + if (!reload) { + AddressInfo addressInfo = new AddressInfo(internalAddressName).addRoutingType(RoutingType.ANYCAST).setInternal(true); + addAddressInfo(addressInfo); + server.createQueue(internalAddressName, +RoutingType.ANYCAST, +internalQueueName, +null, +null, +true, +false, +false, +false, +false, +0, +false, +false, +false, +0, +null, +false, +null, +false, +0, +0L, +false, +0L, +0L, +false, +retroactiveMessageCount); + } + server.deployDivert(new DivertConfiguration() + .setName(internalDivertName.toString()) + .setAddress(retroactiveAddressName.toString()) + .setExclusive(false) + .setForwardingAddress(internalAddressName.toString()) + .setRoutingType(ComponentConfigurationRoutingType.STRIP)); Review comment: It may mean in a retro anycast and a retro multicast queue is required to preserve that 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 318682) Time Spent: 2h 10m (was: 2h) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318685&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318685 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 26/Sep/19 01:19 Start Date: 26/Sep/19 01:19 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on pull request #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#discussion_r328401160 ## File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java ## @@ -1170,6 +1172,10 @@ public SecuritySettingPlugin run() { addressSettings.setDefaultConsumerWindowSize(XMLUtil.parseInt(child)); } else if (DEFAULT_RING_SIZE.equalsIgnoreCase(name)) { addressSettings.setDefaultRingSize(XMLUtil.parseLong(child)); + } else if (RETROACTIVE_MESSAGE_COUNT.equalsIgnoreCase(name)) { +long retroactiveMessageCount = XMLUtil.parseLong(child); +Validators.GE_ZERO.validate(DEFAULT_ADDRESS_ROUTING_TYPE, retroactiveMessageCount); Review comment: Default address routing type in the validator for msg count? 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 318685) Time Spent: 2.5h (was: 2h 20m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >Assignee: Justin Graham Bertram >Priority: Major > Time Spent: 2.5h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318699&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318699 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 26/Sep/19 01:22 Start Date: 26/Sep/19 01:22 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-535288242 On the retroactive queue, would want a flag to tell us its a retro queue, thats then exposed to jmx so that metrics systems can get the tag, and so alerting rules on queue depths can ignore these queues automatically based on that flag. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 318699) Time Spent: 2h 40m (was: 2.5h) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >Assignee: Justin Graham Bertram >Priority: Major > Time Spent: 2h 40m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318703&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318703 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 26/Sep/19 01:25 Start Date: 26/Sep/19 01:25 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on pull request #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#discussion_r328402189 ## File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java ## @@ -467,6 +478,83 @@ private boolean internalAddressInfo(AddressInfo addressInfo, boolean reload) thr } } + private void registerRepositoryListenerForRetroactiveAddress(SimpleString name) { + HierarchicalRepositoryChangeListener repositoryChangeListener = () -> { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + String address = ResourceNames.decomposeRetroactiveResourceName(prefix, name.toString(), ResourceNames.ADDRESS); + AddressSettings settings = addressSettingsRepository.getMatch(address); + Queue internalQueue = server.locateQueue(ResourceNames.getRetroactiveResourceName(prefix, SimpleString.toSimpleString(address), ResourceNames.QUEUE)); + if (internalQueue != null && internalQueue.getRingSize() != settings.getRetroactiveMessageCount()) { +internalQueue.setRingSize(settings.getRetroactiveMessageCount()); + } + }; + addressSettingsRepository.registerListener(repositoryChangeListener); + server.getAddressInfo(name).setRepositoryChangeListener(repositoryChangeListener); + } + + private void createRetroactiveResources(final SimpleString retroactiveAddressName, final long retroactiveMessageCount, final boolean reload) throws Exception { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + final SimpleString internalAddressName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.ADDRESS); + final SimpleString internalQueueName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.QUEUE); + final SimpleString internalDivertName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.DIVERT); + + if (!reload) { + AddressInfo addressInfo = new AddressInfo(internalAddressName).addRoutingType(RoutingType.ANYCAST).setInternal(true); + addAddressInfo(addressInfo); + server.createQueue(internalAddressName, +RoutingType.ANYCAST, Review comment: Should message groups be disabled? So theyre not tracked as not needed in the retro queue and would avoid issues if people have very large numbers of groups. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 318703) Time Spent: 2h 50m (was: 2h 40m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >Assignee: Justin Graham Bertram >Priority: Major > Time Spent: 2h 50m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318706&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318706 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 26/Sep/19 01:28 Start Date: 26/Sep/19 01:28 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on pull request #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#discussion_r328402743 ## File path: artemis-server/src/main/resources/schema/artemis-configuration.xsd ## @@ -3404,6 +3404,14 @@ + + Review comment: Can prefix default. In future or even in this pr it would be good to be able to explicitly set/control this at an address level. Thus this would just be a default thats then applied if none is set at that level 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 318706) Time Spent: 3h (was: 2h 50m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >Assignee: Justin Graham Bertram >Priority: Major > Time Spent: 3h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318709&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318709 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 26/Sep/19 01:33 Start Date: 26/Sep/19 01:33 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on pull request #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#discussion_r328403475 ## File path: docs/user-manual/en/retroactive-addresses.md ## @@ -0,0 +1,73 @@ +# Retroactive Addresses + +A "retroactive" address is an address that will preserve messages sent to it +for queues which will be created on it in the future. This can be useful in, +for example, publish-subscribe use cases where clients want to receive the +messages sent to the address *before* they they actually connected and created +their multicast "subscription" queue. Typically messages sent to an address +before a queue was created on it would simply be unavailable to those queues, +but with a retroactive address a fixed number of messages can be preserved by +the broker and automatically copied into queues subsequently created on the +address. This works for both anycast and multicast queues. + +## Internal Retroactive Resources + +To implement this functionality the broker will create 3 internal resources for +each retroactive address: + +1. A non-exclusive [divert](#diverts) to grab the messages from the retroactive + address. +2. An address to receive the messages from the divert. +3. A [ring queue](#ring-queues) to hold the messages sent to the address by the + divert. The general caveats for ring queues still apply here. See [the + chapter on ring queues](#ring-queues) for more details. + +These resources are important to be aware of as they will show up in the web +console and other management or metric views. They will be named according to +the following pattern: + +``` +..(divert|address|queue).retro +``` + +For example, if an address named `myAddress` had a `retroactive-message-count` +of 10 then resources with these names would be created by default: + +1. A divert on `myAddress` named `$.artemis.internal.myAddress.divert.retro` +2. An address named `$.artemis.internal.myAddress.address.retro` +3. A queue on the address from step #2 named + `$.artemis.internal.myAddress.queue.retro` with a `ring-size` of 10. + +This pattern is important to note as it allows one to configure address-settings +if necessary. + +> Note: +> +> Changing the broker's `internal-naming-prefix` once these retroactive +> resources are created will break the retroactive functionality. +> + +## Configuration + +To configure an address to be "retroactive" simply configure the +`retroactive-message-count` `address-setting` to reflect the number of messages +you want the broker to preserve, e.g.: + + +```xml + + + 100 + + +``` + +The value for `retroactive-message-count` can be updated at runtime either via Review comment: This suggests it updates dynamically. It isnt entirely true as will only update the default for new addresses, existing addresses where the retro queue is created already it doesnt update. This really is acting as a default value, not the explicit. If you needed to change at runtime and existing you would need to find the internal queue and update it. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 318709) Time Spent: 3h 10m (was: 3h) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >Assignee: Justin Graham Bertram >Priority: Major > Time Spent: 3h 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318713&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318713 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 26/Sep/19 01:40 Start Date: 26/Sep/19 01:40 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-535292298 This feature would be more powerful if support for a timebased or bytes size retention, e.g. retro active for last hour etc. I realise that this may not be possible on this initial feature pr but this should impact the way we think about how we design the configuration so its most flexible for future expansion once the abilty for a queue to be ringqueue by byte size or time. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 318713) Time Spent: 3h 20m (was: 3h 10m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >Assignee: Justin Graham Bertram >Priority: Major > Time Spent: 3h 20m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318715&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318715 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 26/Sep/19 01:42 Start Date: 26/Sep/19 01:42 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-535292298 This feature would be more powerful if support for a timebased or bytes size retention, e.g. retro active for last hour etc. I realise that this may not be possible on this initial feature pr but this should impact the way we think about how we design the configuration so its most flexible for future expansion once the abilty for a queue to be constrained (ring or ttl) by byte size or time. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 318715) Time Spent: 3.5h (was: 3h 20m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >Assignee: Justin Graham Bertram >Priority: Major > Time Spent: 3.5h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318720&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318720 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 26/Sep/19 01:57 Start Date: 26/Sep/19 01:57 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on pull request #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#discussion_r328407373 ## File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java ## @@ -467,6 +478,83 @@ private boolean internalAddressInfo(AddressInfo addressInfo, boolean reload) thr } } + private void registerRepositoryListenerForRetroactiveAddress(SimpleString name) { + HierarchicalRepositoryChangeListener repositoryChangeListener = () -> { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + String address = ResourceNames.decomposeRetroactiveResourceName(prefix, name.toString(), ResourceNames.ADDRESS); + AddressSettings settings = addressSettingsRepository.getMatch(address); + Queue internalQueue = server.locateQueue(ResourceNames.getRetroactiveResourceName(prefix, SimpleString.toSimpleString(address), ResourceNames.QUEUE)); + if (internalQueue != null && internalQueue.getRingSize() != settings.getRetroactiveMessageCount()) { +internalQueue.setRingSize(settings.getRetroactiveMessageCount()); + } + }; + addressSettingsRepository.registerListener(repositoryChangeListener); + server.getAddressInfo(name).setRepositoryChangeListener(repositoryChangeListener); + } + + private void createRetroactiveResources(final SimpleString retroactiveAddressName, final long retroactiveMessageCount, final boolean reload) throws Exception { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + final SimpleString internalAddressName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.ADDRESS); + final SimpleString internalQueueName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.QUEUE); + final SimpleString internalDivertName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.DIVERT); + + if (!reload) { + AddressInfo addressInfo = new AddressInfo(internalAddressName).addRoutingType(RoutingType.ANYCAST).setInternal(true); + addAddressInfo(addressInfo); + server.createQueue(internalAddressName, +RoutingType.ANYCAST, +internalQueueName, +null, +null, +true, +false, +false, +false, +false, +0, +false, +false, +false, +0, +null, +false, +null, +false, +0, +0L, +false, +0L, +0L, +false, +retroactiveMessageCount); + } + server.deployDivert(new DivertConfiguration() + .setName(internalDivertName.toString()) + .setAddress(retroactiveAddressName.toString()) + .setExclusive(false) + .setForwardingAddress(internalAddressName.toString()) + .setRoutingType(ComponentConfigurationRoutingType.STRIP)); + } + + private void removeRetroactiveResources(SimpleString address) throws Exception { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + + SimpleString internalDivertName = ResourceNames.getRetroactiveResourceName(prefix, address, ResourceNames.DIVERT); Review comment: The more i think on this the more strongly i think we shouldnt have the divert and separate address, simply should be queue under the existing address. 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: us...@infra.apache.org Issue Time Tracking --- Worklog I
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=318721&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318721 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 26/Sep/19 01:59 Start Date: 26/Sep/19 01:59 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on pull request #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#discussion_r328407373 ## File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java ## @@ -467,6 +478,83 @@ private boolean internalAddressInfo(AddressInfo addressInfo, boolean reload) thr } } + private void registerRepositoryListenerForRetroactiveAddress(SimpleString name) { + HierarchicalRepositoryChangeListener repositoryChangeListener = () -> { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + String address = ResourceNames.decomposeRetroactiveResourceName(prefix, name.toString(), ResourceNames.ADDRESS); + AddressSettings settings = addressSettingsRepository.getMatch(address); + Queue internalQueue = server.locateQueue(ResourceNames.getRetroactiveResourceName(prefix, SimpleString.toSimpleString(address), ResourceNames.QUEUE)); + if (internalQueue != null && internalQueue.getRingSize() != settings.getRetroactiveMessageCount()) { +internalQueue.setRingSize(settings.getRetroactiveMessageCount()); + } + }; + addressSettingsRepository.registerListener(repositoryChangeListener); + server.getAddressInfo(name).setRepositoryChangeListener(repositoryChangeListener); + } + + private void createRetroactiveResources(final SimpleString retroactiveAddressName, final long retroactiveMessageCount, final boolean reload) throws Exception { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + final SimpleString internalAddressName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.ADDRESS); + final SimpleString internalQueueName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.QUEUE); + final SimpleString internalDivertName = ResourceNames.getRetroactiveResourceName(prefix, retroactiveAddressName, ResourceNames.DIVERT); + + if (!reload) { + AddressInfo addressInfo = new AddressInfo(internalAddressName).addRoutingType(RoutingType.ANYCAST).setInternal(true); + addAddressInfo(addressInfo); + server.createQueue(internalAddressName, +RoutingType.ANYCAST, +internalQueueName, +null, +null, +true, +false, +false, +false, +false, +0, +false, +false, +false, +0, +null, +false, +null, +false, +0, +0L, +false, +0L, +0L, +false, +retroactiveMessageCount); + } + server.deployDivert(new DivertConfiguration() + .setName(internalDivertName.toString()) + .setAddress(retroactiveAddressName.toString()) + .setExclusive(false) + .setForwardingAddress(internalAddressName.toString()) + .setRoutingType(ComponentConfigurationRoutingType.STRIP)); + } + + private void removeRetroactiveResources(SimpleString address) throws Exception { + String prefix = server.getConfiguration().getInternalNamingPrefix(); + + SimpleString internalDivertName = ResourceNames.getRetroactiveResourceName(prefix, address, ResourceNames.DIVERT); Review comment: The more i think on this the more strongly i think we shouldnt have the divert and separate address, simply should be queue under the existing address. Both performance wise and also from adaptability for being more configurable in future. 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 Infrastru
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=319634&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-319634 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 27/Sep/19 15:59 Start Date: 27/Sep/19 15:59 Worklog Time Spent: 10m Work Description: jbertram commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-535998932 > How does someone control if the retroactive address will behave when full, e.g. page, block, drop? For the most part you can control the configuration of the internal retroactive address/queues using address settings just like any other address. The resources are named according to a specific pattern which can be used in the `match` for the address-setting. > How or where can someone configure the naming of a retroactive address so they can control their names to avoid conflict or for security settings. The naming pattern is outlined in the documentation. Conflicts can be avoided through the `internal-naming-prefix` setting. > For queues created for retroactive, if there is a very high number of message groups and someone is using buckets so that the group map doesnt explode in size, how is this being avoided in the retroactive queue? Configure the group buckets via an address-setting. I changed this in my latest update. > Is routing type being preserved. Yes, it is being preserved now. I changed this in my latest update. > Why divert and separate address is needed. Why not have the retro queue under the original address? My original plan was to have the ring queues for the retroactive address under the main address itself, but I didn't want those queues to be subject to the address-settings of that address. Separating the ring queues onto their own address means better configuration flexibility. > Default address routing type in the validator for msg count? Fixed in the my latest update. > On the retroactive queue, would want a flag to tell us its a retro queue, thats then exposed to jmx so that metrics systems can get the tag, and so alerting rules on queue depths can ignore these queues automatically based on that flag. Added on my latest update. > In future or even in this pr it would be good to be able to explicitly set/control [the retroactive-message-count] at an address level. Thus this would just be a default thats then applied if none is set at that level As far as I can tell that is already how `retroactive-message-count` is functioning. If not defined then the default of `0` is used. Addresses themselves have no direct configuration attributes other than `name`. The `address-settings` block is designed to configure the settings for an address. I see `retroactive-message-count` the same as settings like `max-size-bytes` and a bunch of others. > This suggests it updates dynamically. It isnt entirely true as will only update the default for new addresses, existing addresses where the retro queue is created already it doesnt update. That's not true. There is a listener which will update the `ring-size` on the ring queues dynamically. > This feature would be more powerful if support for a timebased or bytes size retention, e.g. retro active for last hour etc. Fair enough, but that's not the subject of this PR. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 319634) Time Spent: 4h (was: 3h 50m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >Assignee: Justin Graham Bertram >Priority: Major > Time Spent: 4h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=320571&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-320571 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 30/Sep/19 15:22 Start Date: 30/Sep/19 15:22 Worklog Time Spent: 10m Work Description: michaelpearce-gain commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-536613138 @jbertram re: "My original plan was to have the ring queues for the retroactive address under the main address itself, but I didn't want those queues to be subject to the address-settings of that address. Separating the ring queues onto their own address means better configuration flexibility." The issue here are 1) you have to message copy, not just make new references - expensive if you have a large retro active to get through, also will cause paging faults to occur as copies occur, even if consumer isnt at that message. 2) its going to be very messy as an end user to make address settings for the internal's, especially as typically (as an end user, i probably just want the same settings for bit like paging etc) 3) address settings do not update the queue (in general they are defaults, overrides and actuals are always set at queue level), as such once queue is created its not going to be possible to adjust Also having it at the address allows us to, and the way i was seing this working so then you can set this being better configurable and working nicely is to have these defined as sepecial queues under the address (eg. in broker.xml) true 1024 This way then it can expose any queue settings, easily. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 320571) Time Spent: 4h 10m (was: 4h) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >Assignee: Justin Graham Bertram >Priority: Major > Time Spent: 4h 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=320581&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-320581 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 30/Sep/19 15:36 Start Date: 30/Sep/19 15:36 Worklog Time Spent: 10m Work Description: michaelpearce-gain commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-536613138 @jbertram re: "My original plan was to have the ring queues for the retroactive address under the main address itself, but I didn't want those queues to be subject to the address-settings of that address. Separating the ring queues onto their own address means better configuration flexibility." The issue here are 1) you have to message copy, not just make new references - expensive if you have a large retro active to get through, also will cause paging faults to occur as copies occur, even if consumer isnt at that message. 2) its going to be very messy as an end user to make address settings for the internal's, especially as typically (as an end user, i probably just want the same settings for bit like paging etc) 3) address settings do not update the queue (in general they are defaults, overrides and actuals are always set at queue level), as such once queue is created its not going to be possible to adjust Also having it at the address allows us to, and the way i was seing this working so then you can set this being better configurable and working nicely is to have these defined as sepecial queues under the address (eg. in broker.xml) true 1024 This way then it can expose any queue settings, easily. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 320581) Time Spent: 4h 20m (was: 4h 10m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >Assignee: Justin Graham Bertram >Priority: Major > Time Spent: 4h 20m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=320584&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-320584 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 30/Sep/19 15:42 Start Date: 30/Sep/19 15:42 Worklog Time Spent: 10m Work Description: michaelpearce-gain commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-536613138 @jbertram re: "My original plan was to have the ring queues for the retroactive address under the main address itself, but I didn't want those queues to be subject to the address-settings of that address. Separating the ring queues onto their own address means better configuration flexibility." The issue here are 1) you have to message copy, not just make new references - expensive if you have a large retro active to get through, also will cause paging faults to occur as copies occur, even if consumer isnt at that message. 2) its going to be very messy as an end user to make address settings for the internal's, especially as typically (as an end user, i probably just want the same settings for bit like paging etc) 3) address settings do not update the queue (in general they are defaults, overrides and actuals are always set at queue level), as such once queue is created its not going to be possible to adjust Also having it at the address allows us to, and the way i was seing this working so then you can set this being better configurable and working nicely is to have these defined as sepecial queues under the address (eg. in broker.xml) true This way then it can expose any queue settings, easily, where retro-active-queue is of same schema type as queue (so going forwards as features added, it just maintains) Also then under the address-settings, say someone wants to define a number of defaults we could structure it: Again here this actually is of schema (xsd) queue, and basically this becomes then a queue template, meaning again as features added to queue, we dont have to maintain seperate configs ensuring they align and expose all. This all works though based on the idea the retro queue for an address is under same address. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 320584) Time Spent: 4.5h (was: 4h 20m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >Assignee: Justin Graham Bertram >Priority: Major > Time Spent: 4.5h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=320585&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-320585 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 30/Sep/19 15:43 Start Date: 30/Sep/19 15:43 Worklog Time Spent: 10m Work Description: michaelpearce-gain commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-536613138 @jbertram re: "My original plan was to have the ring queues for the retroactive address under the main address itself, but I didn't want those queues to be subject to the address-settings of that address. Separating the ring queues onto their own address means better configuration flexibility." The issue here are 1) you have to message copy, not just make new references - expensive if you have a large retro active to get through, also will cause paging faults to occur as copies occur, even if consumer isnt at that message. 2) its going to be very messy as an end user to make address settings for the internal's, especially as typically (as an end user, i probably just want the same settings for bit like paging etc) 3) address settings do not update the queue (in general they are defaults, overrides and actuals are always set at queue level), as such once queue is created its not going to be possible to adjust Also having it at the address allows us to, and the way i was seing this working so then you can set this being better configurable and working nicely is to have these defined as sepecial queues under the address (eg. in broker.xml) true This way then it can expose any queue settings, easily, where retro-active-queue is of same schema type as queue (so going forwards as features added, it just maintains) Also then under the address-settings, say someone wants to define a number of defaults we could structure it: Again here this actually is of schema (xsd) queue, and basically this becomes then a queue template, meaning again as features added to queue, we dont have to maintain seperate configs ensuring they align and expose all. This all works though based on the idea the retro queue for an address is under same address. Like wise will mean say for anycast we dont want retro but mutlicast we do, there is a nice split as well. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 320585) Time Spent: 4h 40m (was: 4.5h) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >Assignee: Justin Graham Bertram >Priority: Major > Time Spent: 4h 40m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=320819&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-320819 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 30/Sep/19 19:57 Start Date: 30/Sep/19 19:57 Worklog Time Spent: 10m Work Description: jbertram commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-536725956 As noted, separating the ring queues onto their own address means better configuration flexibility. This is mainly for `max-size-bytes` and `address-full-policy` because of the way these specific settings can impact ring-queues (see the ring queue docs on paging for more details on that). In short, if your ring-queue for retroactive functionality is on the main address and that address starts paging then the retroactive functionality "breaks" in that newly created queues won't get any of the messages sent after paging started. Address-settings can and do update queues. The `retroactive-message-count` that I implemented is one example of this. You can see other examples of this in `org.apache.activemq.artemis.core.server.impl.QueueImpl.AddressSettingsRepositoryListener`. If there are address-settings which currently don't update queues which should we can implement those a separate PR. I'm not clear on what specifically will be "messy" about configuring address-settings for the separate address. For an address named "myRetroactiveAddress" with a `retroactive-message-count` > 0 users should be able to use a match like `*.myRetroactiveAddress.#.retro` to configure what they need. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 320819) Time Spent: 4h 50m (was: 4h 40m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >Assignee: Justin Graham Bertram >Priority: Major > Time Spent: 4h 50m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=320891&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-320891 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 30/Sep/19 21:38 Start Date: 30/Sep/19 21:38 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-536763958 It def shouldnt break if paging occurs. One of the bits myself and clebert have discussed once a time ago. Was the idea that you could have an address paging by default to achive this feature. And then could even have retro active for several days. Should you need replay etc. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 320891) Time Spent: 5h (was: 4h 50m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >Assignee: Justin Graham Bertram >Priority: Major > Time Spent: 5h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=320901&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-320901 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 30/Sep/19 21:55 Start Date: 30/Sep/19 21:55 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-536763958 It def shouldnt break if paging occurs not entirely sure what you meant here. One of the bits myself and clebert have discussed once a time ago. Was the idea that you could have an address paging by default to achive this feature. And then could even have retro active for several days. Should you need replay etc. For address setting match like that it will break if someone uses different wildcard configuration because of the default naming and separators used. E.g. if using "_" separators instead of "." 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 320901) Time Spent: 5h 10m (was: 5h) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >Assignee: Justin Graham Bertram >Priority: Major > Time Spent: 5h 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=320903&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-320903 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 30/Sep/19 21:56 Start Date: 30/Sep/19 21:56 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-536763958 It def shouldnt break if paging occurs not entirely sure what you meant here. One of the bits myself and clebert have discussed once a time ago. Was the idea that you could have an address paging by default to achive this feature. And then could even have retro active for several days. Should you need replay etc. For address setting match like that it will break if someone uses different wildcard configuration because of the default naming and separators used in creation of the new address names E.g. if using "_" separators instead of "." It wouldnt be possible to do as you suggest 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 320903) Time Spent: 5h 20m (was: 5h 10m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Graham Bertram >Assignee: Justin Graham Bertram >Priority: Major > Time Spent: 5h 20m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=322382&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-322382 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 03/Oct/19 00:32 Start Date: 03/Oct/19 00:32 Worklog Time Spent: 10m Work Description: jbertram commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-537736577 > It def shouldnt break if paging occurs not entirely sure what you meant here. The explanation is in my previous comment, "...newly created queues won't get any of the messages sent after paging started." I assumed you were familiar with the caveats for ring queues and paging given they are outlined in the documentation and you reviewed that PR. > One of the bits myself and clebert have discussed once a time ago. Clebert hasn't been involved in this implementation. > For address setting match like that it will break if someone uses different wildcard configuration... I addressed this issue in my last push. The names of the resources will reflect the delimiter configuration. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 322382) Time Spent: 5.5h (was: 5h 20m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Time Spent: 5.5h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=323767&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-323767 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 04/Oct/19 22:26 Start Date: 04/Oct/19 22:26 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-538579769 @jbertram tbh im struggling to understand still the issue, if an address is paging to disk, ring queue still gets new messages delivered. on address-settings front thanks, that seems to make things work for custom wildcards. When i have a large retro-active queue, and a new consumer joins, and that consumer may take 5 minutes to process those messages, im seeing some nasty GC spikes at the initial few seconds, from debugging that seems to be when the messages are copied back to route to original address and the new queue, as the broker goes as fast as it can regardless of the consumer speed. This kind of behaviour could destabilise the broker. Ideas to solve or limit this issue: 1) is there a way to control the copy over so its not done as one big bang (e.g. as fast as broker can possible do), but feed the new queue at the rate the consumer is consuming there for avoiding the very big spike in object creation. 2) Is it possible to make it so that we dont have to copy, but it simply is a message ref? 3) If 2 is not possible because a separate address, could we have a toggle that will deploy under the original address and when deployed like such a copy isnt needed and simply message ref is added to the queue, so then its a choice for end users. this then gives a kind of flexibility depending on end user case, with trade off for either, but at least then its up for the end user. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 323767) Time Spent: 5h 40m (was: 5.5h) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Time Spent: 5h 40m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=323768&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-323768 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 04/Oct/19 22:27 Start Date: 04/Oct/19 22:27 Worklog Time Spent: 10m Work Description: michaelandrepearce commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-538579769 @jbertram tbh im struggling to understand still the issue, if an address is paging to disk, ring queue still gets new messages delivered, theyre just paged references. on address-settings front thanks, that seems to make things work for custom wildcards. When i have a large retro-active queue, and a new consumer joins, and that consumer may take 5 minutes to process those messages, im seeing some nasty GC spikes at the initial few seconds, from debugging that seems to be when the messages are copied back to route to original address and the new queue, as the broker goes as fast as it can regardless of the consumer speed. This kind of behaviour could destabilise the broker. Ideas to solve or limit this issue: 1) is there a way to control the copy over so its not done as one big bang (e.g. as fast as broker can possible do), but feed the new queue at the rate the consumer is consuming there for avoiding the very big spike in object creation. 2) Is it possible to make it so that we dont have to copy, but it simply is a message ref? 3) If 2 is not possible because a separate address, could we have a toggle that will deploy under the original address and when deployed like such a copy isnt needed and simply message ref is added to the queue, so then its a choice for end users. this then gives a kind of flexibility depending on end user case, with trade off for either, but at least then its up for the end user. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 323768) Time Spent: 5h 50m (was: 5h 40m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Time Spent: 5h 50m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (ARTEMIS-2504) Support retroactive addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-2504?focusedWorklogId=324544&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-324544 ] ASF GitHub Bot logged work on ARTEMIS-2504: --- Author: ASF GitHub Bot Created on: 07/Oct/19 18:19 Start Date: 07/Oct/19 18:19 Worklog Time Spent: 10m Work Description: jbertram commented on issue #2850: ARTEMIS-2504 implement retroactive addresses URL: https://github.com/apache/activemq-artemis/pull/2850#issuecomment-539140540 > if an address is paging to disk, ring queue still gets new messages delivered, theyre just paged references. According to my tests the ring queue will *not* actually get those messages. From what I can tell messages are paged at the address level, and they aren't added to the actual queue until they are de-paged. Regarding the performance issues, my initial recommendation would be to limit the size of the ring queue to avoid such problems. As for your ideas... > is there a way to control the copy over so its not done as one big bang (e.g. as fast as broker can possible do), but feed the new queue at the rate the consumer is consuming there for avoiding the very big spike in object creation. I understand your point about throttling the copy speed, but I'm not sure that will provide the semantics a consumer expects. Once the queue is created then it will receive any "new" message sent to the queue's address (at least in the multicast use-case). If the "old," retroactive messages are not all immediately added to the queue then the consumer might receive "new" messages before it receives all the "old" ones. Also, since messages are added to the queue when it is first created and before the client even consumes anything how can we calculate the consumption rate in order to throttle the copy rate? > Is it possible to make it so that we dont have to copy, but it simply is a message ref? I'll explore this possibility. 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 324544) Time Spent: 6h (was: 5h 50m) > Support retroactive addresses > - > > Key: ARTEMIS-2504 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2504 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Time Spent: 6h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)