[
https://issues.apache.org/jira/browse/ARTEMIS-4510?focusedWorklogId=902408&page=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)