Github user gtully commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1820#discussion_r164159618
--- Diff:
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java
---
@@ -698,8 +699,17 @@ private ActiveMQMessageConsumer createConsumer(final
ActiveMQDestination dest,
*/
if (!response.isExists() ||
!response.getQueueNames().contains(dest.getSimpleAddress())) {
if (response.isAutoCreateQueues()) {
+ SimpleString queueNameToUse = dest.getSimpleAddress();
+ SimpleString addressToUse = queueNameToUse;
+ RoutingType routingTypeToUse = RoutingType.ANYCAST;
+ if
(CompositeAddress.isFullyQualified(queueNameToUse.toString())) {
+ CompositeAddress compositeAddress =
CompositeAddress.getQueueName(queueNameToUse.toString());
+ addressToUse = new
SimpleString(compositeAddress.getAddress());
+ queueNameToUse = new
SimpleString(compositeAddress.getQueueName());
+ routingTypeToUse = RoutingType.MULTICAST;
--- End diff --
it is, at least the use case in the test. It may be that some FQQN
scenarios are not applicable to CORE.
I am not sure how to determine the routingTypeToUse if both the address and
subscription queue need to be created.
Is there a way to know this is a fanout consumer queue/subscription queue
rather than a simple ANYCAST address.
On the server in the openwire case there is a binding query such the
address provides this information but I did not want to go down the route of
another round trip.
---