[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=913581=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-913581 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 09/Apr/24 07:03 Start Date: 09/Apr/24 07:03 Worklog Time Spent: 10m Work Description: AntonRoskvist commented on PR #4867: URL: https://github.com/apache/activemq-artemis/pull/4867#issuecomment-2044282712 @clebertsuconic Excellent, thanks for your fixes! Issue Time Tracking --- Worklog Id: (was: 913581) Time Spent: 5.5h (was: 5h 20m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 5.5h > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=913505=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-913505 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 08/Apr/24 19:01 Start Date: 08/Apr/24 19:01 Worklog Time Spent: 10m Work Description: clebertsuconic closed pull request #4681: ARTEMIS-4510 - Add auto-create-destination logic to diverts URL: https://github.com/apache/activemq-artemis/pull/4681 Issue Time Tracking --- Worklog Id: (was: 913505) Time Spent: 5h 20m (was: 5h 10m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 5h 20m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=913502=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-913502 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 08/Apr/24 18:57 Start Date: 08/Apr/24 18:57 Worklog Time Spent: 10m Work Description: clebertsuconic closed pull request #4867: ARTEMIS-4510 - Add auto-create-destination logic to diverts URL: https://github.com/apache/activemq-artemis/pull/4867 Issue Time Tracking --- Worklog Id: (was: 913502) Time Spent: 5h (was: 4h 50m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 5h > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=913503=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-913503 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 08/Apr/24 18:57 Start Date: 08/Apr/24 18:57 Worklog Time Spent: 10m Work Description: clebertsuconic commented on PR #4867: URL: https://github.com/apache/activemq-artemis/pull/4867#issuecomment-2043460610 actually.. I pushed a commit Issue Time Tracking --- Worklog Id: (was: 913503) Time Spent: 5h 10m (was: 5h) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 5h 10m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=913484=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-913484 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 08/Apr/24 15:00 Start Date: 08/Apr/24 15:00 Worklog Time Spent: 10m Work Description: clebertsuconic commented on PR #4867: URL: https://github.com/apache/activemq-artemis/pull/4867#issuecomment-2042993128 @AntonRoskvist I pulled your changes, removed all the docs and stuff and pushed on main (I pushed as you). now you have to give a JIRA to your other change. it's probably easier if you cherry-pick that issue on main than rebasing as you now have conflicts. I don't mind if you keep this very same PR but you will need to push -f with just that change now. if you can't do it I will do those things myself.. let me know if you want / can do it. Thank you. Issue Time Tracking --- Worklog Id: (was: 913484) Time Spent: 4h 50m (was: 4h 40m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 4h 50m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=913437=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-913437 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 08/Apr/24 09:49 Start Date: 08/Apr/24 09:49 Worklog Time Spent: 10m Work Description: AntonRoskvist commented on PR #4867: URL: https://github.com/apache/activemq-artemis/pull/4867#issuecomment-2042323454 @clebertsuconic Sounds great, thanks! I went ahead and separated the changes. Let me know when/if you are happy with your testing (removing the config option and always reusing the session) and I'll go ahead and remove the config option as well as some documentation from this PR. Issue Time Tracking --- Worklog Id: (was: 913437) Time Spent: 4h 40m (was: 4.5h) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 4h 40m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=913310=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-913310 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 06/Apr/24 14:30 Start Date: 06/Apr/24 14:30 Worklog Time Spent: 10m Work Description: clebertsuconic commented on PR #4867: URL: https://github.com/apache/activemq-artemis/pull/4867#issuecomment-2041105175 @AntonRoskvist some time ago I had already made routing able to auto-create destinations as long as the session from the client is used. Since you are passing the session now, I think we should just use that functionality as is... We wouldn't break anythiing. This is different than having Divert performing the auto-creation. this was the missing link.. it's a lot cleaner!!! Issue Time Tracking --- Worklog Id: (was: 913310) Time Spent: 4.5h (was: 4h 20m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 4.5h > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=913267=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-913267 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 05/Apr/24 20:07 Start Date: 05/Apr/24 20:07 Worklog Time Spent: 10m Work Description: AntonRoskvist commented on PR #4867: URL: https://github.com/apache/activemq-artemis/pull/4867#issuecomment-2040552002 @clebertsuconic Thanks for your feedback! I agree, however that means potentially breaking some use-case currently depending on those messages getting "discarded" . I feel a note in the upcoming versions doc should suffice but just making sure everyone's in agreement about this. I will separate the changes as well. I will probably send that by Monday Issue Time Tracking --- Worklog Id: (was: 913267) Time Spent: 4h 20m (was: 4h 10m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 4h 20m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=913266=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-913266 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 05/Apr/24 19:19 Start Date: 05/Apr/24 19:19 Worklog Time Spent: 10m Work Description: clebertsuconic commented on PR #4867: URL: https://github.com/apache/activemq-artemis/pull/4867#issuecomment-2040491797 I think the remove attributes from cluster becomes a separate issue indeed. i don't mind about a separate PR.. but definitely a separate commit. Can you separate that change? but let me do some testing with removing the configuration options and just always reusing the session. Issue Time Tracking --- Worklog Id: (was: 913266) Time Spent: 4h 10m (was: 4h) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 4h 10m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=913264=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-913264 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 05/Apr/24 19:18 Start Date: 05/Apr/24 19:18 Worklog Time Spent: 10m Work Description: clebertsuconic commented on PR #4867: URL: https://github.com/apache/activemq-artemis/pull/4867#issuecomment-2040490408 @AntonRoskvist I'm thinking we should just always reuse the session... meaning I think that's the missing link :) Issue Time Tracking --- Worklog Id: (was: 913264) Time Spent: 4h (was: 3h 50m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 4h > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=912072=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-912072 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 28/Mar/24 14:43 Start Date: 28/Mar/24 14:43 Worklog Time Spent: 10m Work Description: AntonRoskvist opened a new pull request, #4867: URL: https://github.com/apache/activemq-artemis/pull/4867 This is the second try of #4681 after a round of feedback on the dev mailing list. @jbertram @brusdev @clebertsuconic Please let me know if you agree to these changes or if I should change anything else. An additional thing of note in this PR is added handling for a fringe issue I found while working on this PR pertaining to redistributed messages arriving on the divert. There is an added test for this as well. I can break this part out into a separate PR if preferred. Issue Time Tracking --- Worklog Id: (was: 912072) Time Spent: 3h 50m (was: 3h 40m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 3h 50m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=910298=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-910298 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 18/Mar/24 09:33 Start Date: 18/Mar/24 09:33 Worklog Time Spent: 10m Work Description: AntonRoskvist commented on PR #4681: URL: https://github.com/apache/activemq-artemis/pull/4681#issuecomment-2003331818 @clebertsuconic Started a thread on the dev mailing list to see if we can reach some consensus there, flagging this as draft until then. Issue Time Tracking --- Worklog Id: (was: 910298) Time Spent: 3h 40m (was: 3.5h) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 3h 40m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=910122=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-910122 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 15/Mar/24 14:42 Start Date: 15/Mar/24 14:42 Worklog Time Spent: 10m Work Description: clebertsuconic commented on PR #4681: URL: https://github.com/apache/activemq-artemis/pull/4681#issuecomment-1999817123 @AntonRoskvist being 100% open about this... I have a disagreement point with @jbertram on this. I think if you Divert to an address foo, that address should be part of the verification of the auto-create. Justin thinks that's a breaking change, and I see it as a bug Maybe you could open a discuss thread on the dev-list to talk about it and find consensus among other people? IMO we should just document the change and tell users if they must route to nowhere they should have either a disabled auto-create on the Address-settings.. or an empty MultiCast address (eg address ReturnedItems or Orders without a subscription). One thing I 100% agree with Justin though is that we shouldn't penalize the regular case with checking auto-create every time. We need to find an optimal way of doing it. Issue Time Tracking --- Worklog Id: (was: 910122) Time Spent: 3.5h (was: 3h 20m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 3.5h > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=910083=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-910083 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 15/Mar/24 10:45 Start Date: 15/Mar/24 10:45 Worklog Time Spent: 10m Work Description: AntonRoskvist commented on PR #4681: URL: https://github.com/apache/activemq-artemis/pull/4681#issuecomment-1999392303 @clebertsuconic @jbertram Let me know if you want me to either: Remove the condition and new address setting for auto-creation and simply auto create if the destination is configured for it Or to add a subscribe to changes by registering a listener on the HierarchicalRepositoryChangeListener. I can go either way but personally I prefer the first option... the risk of breaking a preexisting use-case where sending directly to a non existing destination should create it but diverting to it should silently fail seems small... perhaps a note about this change of semantics could be added to the versions doc instead? Issue Time Tracking --- Worklog Id: (was: 910083) Time Spent: 3h 20m (was: 3h 10m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 3h 20m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=910064=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-910064 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 15/Mar/24 08:37 Start Date: 15/Mar/24 08:37 Worklog Time Spent: 10m Work Description: AntonRoskvist commented on PR #4681: URL: https://github.com/apache/activemq-artemis/pull/4681#issuecomment-1999173285 @clebertsuconic The use-case for me (and another user I spoke to on the slack channel) is to be able to compute a destination during runtime inside the transformer. The other user was after something like "If message has header X, address = somePrefix + headerX" I want to use this for a global routing system that would look something like this: 1. Divert wildcard-matches destinations following a naming system that includes a site name (this matches a few hundred destinations, destinations are created dynamically by clients). 2. Divert adds some metadata to messages and aggregates them to a common/aggregate destination (no auto-create needed here) 3. A core bridge picks these messages up and sends them to their destination site. 4. A Divert on the destination site routes messages from the aggregate destination and back to their original destination name (or in some cases another related destination name), based on logic in a transformer (ultimately changing the messages address) I do not want to use the __AMQ_ORIGINAL_DESTINATION headers for this as in the event of some network issues or similar messages would end up on a DLA whereby said header changes to the aggregate queue name and identification afterwards becomes... labour intensive... Issue Time Tracking --- Worklog Id: (was: 910064) Time Spent: 3h 10m (was: 3h) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 3h 10m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=910013=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-910013 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 15/Mar/24 03:12 Start Date: 15/Mar/24 03:12 Worklog Time Spent: 10m Work Description: clebertsuconic commented on PR #4681: URL: https://github.com/apache/activemq-artemis/pull/4681#issuecomment-1998863063 @jbertram I actually thought we would create auto-created destinations on Divert. I kind of agree with @AntonRoskvist here that we already have an auto-create attribute. If you're Diverting to an non existing destination, you could create it. Although.. going a step back.. why you would create a Divert to a non existing destination? a Divert is from one destination to another, right? why so you need auto-create on diverts? Issue Time Tracking --- Worklog Id: (was: 910013) Time Spent: 3h (was: 2h 50m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 3h > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=910012=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-910012 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 15/Mar/24 03:10 Start Date: 15/Mar/24 03:10 Worklog Time Spent: 10m Work Description: clebertsuconic commented on code in PR #4681: URL: https://github.com/apache/activemq-artemis/pull/4681#discussion_r1525706187 ## artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/DivertImpl.java: ## @@ -136,6 +139,21 @@ public void route(final Message message, final RoutingContext context) throws Ex // We call reencode at the end only, in a single call. copy.reencode(); + +if (postOffice.getAddressSettingsMatch(copy.getAddress()).isAutoCreateDivertDestination()) { Review Comment: Instead of getAddressSettingsMatch on every message (which will actually have a negative perf impact for any case), you should rather check once, and register a listener on the HierarchicalRepositoryChangeListener. This is how actually page updates the maxPage data after anything is changed: https://github.com/apache/activemq-artemis/blob/89c3a627e9ca2b1ef48a6411d372c32f90a6f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingManagerImpl.java#L192-L194 you could also have such listener done on a higher level and call every Divert to recalculate attributes (that would be less risky of leaks, say a Divert being unregistered would leak on the Listener). Issue Time Tracking --- Worklog Id: (was: 910012) Time Spent: 2h 50m (was: 2h 40m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 2h 50m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=909971=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-909971 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 14/Mar/24 20:29 Start Date: 14/Mar/24 20:29 Worklog Time Spent: 10m Work Description: AntonRoskvist commented on code in PR #4681: URL: https://github.com/apache/activemq-artemis/pull/4681#discussion_r1525453152 ## artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/AddressSettings.java: ## @@ -1835,6 +1856,8 @@ public void encode(ActiveMQBuffer buffer) { BufferHelper.writeNullableInteger(buffer, prefetchPageBytes); BufferHelper.writeNullableInteger(buffer, prefetchPageMessages); + + BufferHelper.writeNullableBoolean(buffer, autoCreateDivertDestination); Review Comment: @clebertsuconic Yes, looking good after rebasing. Thanks! Issue Time Tracking --- Worklog Id: (was: 909971) Time Spent: 2h 40m (was: 2.5h) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 2h 40m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=909954=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-909954 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 14/Mar/24 17:43 Start Date: 14/Mar/24 17:43 Worklog Time Spent: 10m Work Description: clebertsuconic commented on code in PR #4681: URL: https://github.com/apache/activemq-artemis/pull/4681#discussion_r1525279265 ## artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/AddressSettings.java: ## @@ -1835,6 +1856,8 @@ public void encode(ActiveMQBuffer buffer) { BufferHelper.writeNullableInteger(buffer, prefetchPageBytes); BufferHelper.writeNullableInteger(buffer, prefetchPageMessages); + + BufferHelper.writeNullableBoolean(buffer, autoCreateDivertDestination); Review Comment: @AntonRoskvist I have merged #4854... if you rebase against main, you can add anything to the tests you mentioned and it should work now. I have removed any usage of the older encoder.. just keeping the decoder for compatibility with older journals. Issue Time Tracking --- Worklog Id: (was: 909954) Time Spent: 2.5h (was: 2h 20m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 2.5h > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=909905=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-909905 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 14/Mar/24 14:39 Start Date: 14/Mar/24 14:39 Worklog Time Spent: 10m Work Description: clebertsuconic commented on code in PR #4681: URL: https://github.com/apache/activemq-artemis/pull/4681#discussion_r1524997952 ## artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/AddressSettings.java: ## @@ -1835,6 +1856,8 @@ public void encode(ActiveMQBuffer buffer) { BufferHelper.writeNullableInteger(buffer, prefetchPageBytes); BufferHelper.writeNullableInteger(buffer, prefetchPageMessages); + + BufferHelper.writeNullableBoolean(buffer, autoCreateDivertDestination); Review Comment: @AntonRoskvist Can you add your change and rebase your PR on top of https://github.com/apache/activemq-artemis/pull/4854 The tests were still using the old method. I am removing *any* usage from the AddressSettings usage, and I am now making it *clearer* with a big javadoc to not have any more additions. The reason that you needed to add a field now was a reason I added the JSON format. I got tired to see that method's wire being changed over time. That got even worse when I played with my private branches when I was only bringing the newer field and not the previous field. So, if I added field A and B on apache/master and only Brough field B to a private branch, my wire would be inconsistent with apache/main. It was being clusterFreak to manage it :) If you could bring my commit to your PR (Rebase as I said), and bring any changes you like, it should now work. Issue Time Tracking --- Worklog Id: (was: 909905) Time Spent: 2h 20m (was: 2h 10m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 2h 20m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=909892=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-909892 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 14/Mar/24 13:39 Start Date: 14/Mar/24 13:39 Worklog Time Spent: 10m Work Description: clebertsuconic commented on code in PR #4681: URL: https://github.com/apache/activemq-artemis/pull/4681#discussion_r1524897918 ## artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/AddressSettings.java: ## @@ -1835,6 +1856,8 @@ public void encode(ActiveMQBuffer buffer) { BufferHelper.writeNullableInteger(buffer, prefetchPageBytes); BufferHelper.writeNullableInteger(buffer, prefetchPageMessages); + + BufferHelper.writeNullableBoolean(buffer, autoCreateDivertDestination); Review Comment: I will run the tests and take a look... will comment back here after my findings by the end of my day . Issue Time Tracking --- Worklog Id: (was: 909892) Time Spent: 2h 10m (was: 2h) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 2h 10m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=909858=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-909858 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 14/Mar/24 10:11 Start Date: 14/Mar/24 10:11 Worklog Time Spent: 10m Work Description: AntonRoskvist commented on code in PR #4681: URL: https://github.com/apache/activemq-artemis/pull/4681#discussion_r1524585315 ## artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/AddressSettings.java: ## @@ -1835,6 +1856,8 @@ public void encode(ActiveMQBuffer buffer) { BufferHelper.writeNullableInteger(buffer, prefetchPageBytes); BufferHelper.writeNullableInteger(buffer, prefetchPageMessages); + + BufferHelper.writeNullableBoolean(buffer, autoCreateDivertDestination); Review Comment: @clebertsuconic Thanks, I have made the changes you suggested. The only thing I'm noticing now is that if I inject this setting in some current persistence tests they start failing, though I guess that might be expected with this new method? One example of a test that would fail is for instance: `org.apache.activemq.artemis.tests.integration.persistence.AddressSettingsConfigurationStorageTest#testStoreSecuritySettings()` where if I add some random previous address setting (like `setAutoDeleteAddresses(true)`) the test still passes, whereas if I add `setAutoCreateDivertDestination(true)` the test fails. Is that right/expected or am I missing something? Issue Time Tracking --- Worklog Id: (was: 909858) Time Spent: 2h (was: 1h 50m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 2h > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=909788=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-909788 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 14/Mar/24 03:26 Start Date: 14/Mar/24 03:26 Worklog Time Spent: 10m Work Description: clebertsuconic commented on code in PR #4681: URL: https://github.com/apache/activemq-artemis/pull/4681#discussion_r1524154920 ## artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/AddressSettings.java: ## @@ -1835,6 +1856,8 @@ public void encode(ActiveMQBuffer buffer) { BufferHelper.writeNullableInteger(buffer, prefetchPageBytes); BufferHelper.writeNullableInteger(buffer, prefetchPageMessages); + + BufferHelper.writeNullableBoolean(buffer, autoCreateDivertDestination); Review Comment: new version now is using the JSON encoded on the journal.. the older stuff is just for the journals... so these are not needed I think. Issue Time Tracking --- Worklog Id: (was: 909788) Time Spent: 1h 50m (was: 1h 40m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 1h 50m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=909787=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-909787 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 14/Mar/24 03:26 Start Date: 14/Mar/24 03:26 Worklog Time Spent: 10m Work Description: clebertsuconic commented on code in PR #4681: URL: https://github.com/apache/activemq-artemis/pull/4681#discussion_r1524154635 ## artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/AddressSettings.java: ## @@ -1835,6 +1856,8 @@ public void encode(ActiveMQBuffer buffer) { BufferHelper.writeNullableInteger(buffer, prefetchPageBytes); BufferHelper.writeNullableInteger(buffer, prefetchPageMessages); + + BufferHelper.writeNullableBoolean(buffer, autoCreateDivertDestination); Review Comment: don't think we should change these. Issue Time Tracking --- Worklog Id: (was: 909787) Time Spent: 1h 40m (was: 1.5h) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 1h 40m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=909785=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-909785 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 14/Mar/24 03:25 Start Date: 14/Mar/24 03:25 Worklog Time Spent: 10m Work Description: clebertsuconic commented on code in PR #4681: URL: https://github.com/apache/activemq-artemis/pull/4681#discussion_r1524154424 ## artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/AddressSettings.java: ## @@ -1679,7 +1699,8 @@ public int getEncodeSize() { BufferHelper.sizeOfNullableInteger(idCacheSize) + BufferHelper.sizeOfNullableSimpleString(pageFullMessagePolicy != null ? pageFullMessagePolicy.toString() : null) + BufferHelper.sizeOfNullableInteger(prefetchPageBytes) + - BufferHelper.sizeOfNullableInteger(prefetchPageMessages); + BufferHelper.sizeOfNullableInteger(prefetchPageMessages) + + BufferHelper.sizeOfNullableBoolean(autoCreateDivertDestination); Review Comment: I'm not sure this is needed any longer... we are not changing the wires for the old methods. Preetty much just use JSON for anything new now.. older stuff should stay as is. ## artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/AddressSettings.java: ## @@ -1601,6 +1617,10 @@ public void decode(ActiveMQBuffer buffer, boolean tryCompatible) { if (buffer.readableBytes() > 0) { prefetchPageMessages = BufferHelper.readNullableInteger(buffer); } + + if (buffer.readableBytes() > 0) { Review Comment: I don't think we should change these. Issue Time Tracking --- Worklog Id: (was: 909785) Time Spent: 1.5h (was: 1h 20m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 1.5h > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=909143=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-909143 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 11/Mar/24 10:08 Start Date: 11/Mar/24 10:08 Worklog Time Spent: 10m Work Description: AntonRoskvist commented on PR #4681: URL: https://github.com/apache/activemq-artemis/pull/4681#issuecomment-1988043721 This was accidentally closed it seems. @jbertram please review the most recent changes when you have the time for it and see if they conform to what you requested. Issue Time Tracking --- Worklog Id: (was: 909143) Time Spent: 1h 20m (was: 1h 10m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 1h 20m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=909142=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-909142 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 11/Mar/24 10:05 Start Date: 11/Mar/24 10:05 Worklog Time Spent: 10m Work Description: AntonRoskvist opened a new pull request, #4681: URL: https://github.com/apache/activemq-artemis/pull/4681 This enables the use of dynamic routing decisions within the transformer by setting the message address. It also covers for a rare problem where if any of the forwarding addresses are removed during runtime, such as from auto-delete, the message would get silently dropped. Issue Time Tracking --- Worklog Id: (was: 909142) Time Spent: 1h 10m (was: 1h) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 1h 10m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=903705=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-903705 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 05/Feb/24 19:00 Start Date: 05/Feb/24 19:00 Worklog Time Spent: 10m Work Description: AntonRoskvist closed pull request #4681: ARTEMIS-4510 - Add auto-create-destination logic to diverts URL: https://github.com/apache/activemq-artemis/pull/4681 Issue Time Tracking --- Worklog Id: (was: 903705) Time Spent: 1h (was: 50m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 1h > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=903361=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-903361 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 02/Feb/24 15:15 Start Date: 02/Feb/24 15:15 Worklog Time Spent: 10m Work Description: AntonRoskvist commented on PR #4681: URL: https://github.com/apache/activemq-artemis/pull/4681#issuecomment-1924080271 @jbertram Yeah that makes sense, your right. I hope these changes are proper and address your points there. Otherwise just let me know. Btw, I rebased against main as well. Issue Time Tracking --- Worklog Id: (was: 903361) Time Spent: 50m (was: 40m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 50m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=902408=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-902408 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 29/Jan/24 19:21 Start Date: 29/Jan/24 19:21 Worklog Time Spent: 10m Work Description: jbertram commented on PR #4681: URL: https://github.com/apache/activemq-artemis/pull/4681#issuecomment-1915403223 You're right that the `auto-create-*` configs in the `address-settings` apply here. The problem is that they don't apply to this use-case _right now_, and this commit changes this fact which will potentially change behavior for folks who upgrade with no changes to their configuration. Furthermore, this commit also changes the behavior if the target does not exist. Previously no error would be thrown if the target address didn't exists, but now an error will be thrown. Such an error will not only impact the divert but the original send as well. From what I can tell **no** message will get routed if the divert's target doesn't exist and auto-creation fails. We just can't do that in a minor release. Therefore there needs to be a new configuration element on the divert that disables this behavior by default. There are security implications here as well. You're using `context.getServerSession()` for auto-creation which will use the original sender's credentials to auto-create the address and/or queue. This may not make sense for every use-case. Lastly, there's a weird wrinkle with `org.apache.activemq.artemis.core.server.impl.ServerSessionImpl#checkAutoCreate` in that if the routing-type of the passed `QueueConfiguration` is `null` then it returns `AutoCreateResult.EXISTED` which can lead to some unexpected behavior with the divert's default routing-type (i.e. `STRIP`). Issue Time Tracking --- Worklog Id: (was: 902408) Time Spent: 40m (was: 0.5h) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 40m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=901141=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-901141 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 23/Jan/24 08:52 Start Date: 23/Jan/24 08:52 Worklog Time Spent: 10m Work Description: AntonRoskvist commented on PR #4681: URL: https://github.com/apache/activemq-artemis/pull/4681#issuecomment-1905583151 Thanks for your feedback @jbertram I'd argue that the behavior already is configurable though, through the "auto-create"-configs in the address-settings... As for the performance implication, I agree that this could have some additional cost associated with it... however the same operation is carried out during normal routing within the postOffice, twice... at `PostOfficeImpl#checkAddress()` and `PostOfficeImpl#simpleRoute()`. The reason they are not applied for the diverted messages is because the message copies does not have a reference back to their original `ServerSession`... don't know if this is safe, but perhaps the Divert could do this instead: `postOffice.route(copy, new RoutingContextImpl(context.getTransaction()).setReusable(false).setRoutingType(copy.getRoutingType()), false);` ---> `postOffice.route(copy, new RoutingContextImpl(context.getTransaction()).setReusable(false).setRoutingType(copy.getRoutingType()).setServerSession(context.getServerSession()), false);` That way the currently implemented auto-create-logic within PostOffice would apply instead. Thoughts on this? And just to be clear, I'd be open to re-implement all together according to your suggestion if you think that makes more sense, just let me know. Issue Time Tracking --- Worklog Id: (was: 901141) Time Spent: 0.5h (was: 20m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 0.5h > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=901098=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-901098 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 23/Jan/24 03:16 Start Date: 23/Jan/24 03:16 Worklog Time Spent: 10m Work Description: jbertram commented on PR #4681: URL: https://github.com/apache/activemq-artemis/pull/4681#issuecomment-1905221467 This is an interesting improvement which I think has some merit. However, I have two concerns: - This changes the default behavior of every divert. This may break existing users who actually depend on the current behavior. Therefore, this functionality should be configurable. - This will have a negative impact on performance. _Every_ time a message is diverted `checkAutoCreate` will be invoked with a new `QueueConfiguration`. This will increase CPU utilization and GC pressure. Perhaps the divert could invoke `checkAutoCreate` once when it was deployed and then also during the execution of `route` if and only if a transformer was invoked. Issue Time Tracking --- Worklog Id: (was: 901098) Time Spent: 20m (was: 10m) > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4510) Add auto-create-destination logic to diverts
[ https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=891146=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-891146 ] ASF GitHub Bot logged work on ARTEMIS-4510: --- Author: ASF GitHub Bot Created on: 17/Nov/23 20:07 Start Date: 17/Nov/23 20:07 Worklog Time Spent: 10m Work Description: AntonRoskvist opened a new pull request, #4681: URL: https://github.com/apache/activemq-artemis/pull/4681 This enables the use of dynamic routing decisions within the transformer by setting the message address. It also covers for a rare problem where if any of the forwarding addresses are removed during runtime, such as from auto-delete, the message would get silently dropped. Issue Time Tracking --- Worklog Id: (was: 891146) Remaining Estimate: 0h Time Spent: 10m > Add auto-create-destination logic to diverts > > > Key: ARTEMIS-4510 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4510 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Anton Roskvist >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > This enables the use of dynamic routing decisions within the transformer by > setting the message address. It also covers for a rare problem where if any > of the forwarding addresses are removed during runtime, such as from > auto-delete, the message would get silently dropped. -- This message was sent by Atlassian Jira (v8.20.10#820010)