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`). -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
