Github user gtully commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1759#discussion_r162113988
--- Diff:
artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java
---
@@ -194,7 +195,14 @@ private boolean checkAutoCreateQueue(SimpleString
queueName, boolean isTemporary
try {
if (!queueBinding.isExists()) {
if (bindingQuery.isAutoCreateQueues()) {
- server.createQueue(queueName, RoutingType.ANYCAST,
queueName, null, true, isTemporary);
+ SimpleString queueNameToUse = queueName;
+ SimpleString addressToUse = queueName;
+ if
(CompositeAddress.isFullyQualified(queueName.toString())) {
+ CompositeAddress compositeAddress =
CompositeAddress.getQueueName(queueName.toString());
+ addressToUse = new
SimpleString(compositeAddress.getAddress());
+ queueNameToUse = new
SimpleString(compositeAddress.getQueueName());
+ }
--- End diff --
hmm, all the tests had a createProducer earlier that auto created the
address.
With a createConsumer first I see the problem, the bindingQuery AddressInfo
is null.
Passing a null routing type in that case and some tidy up in auto address
creation in serverimpl works but the routingType comes from
defaultConfiguration rather than the address settings in that case.
Question - should the caller figure the routingType from the
addressSettings and if so should the logic for null routingType in createQueue
get whacked?
---