gemmellr commented on code in PR #4502:
URL: https://github.com/apache/activemq-artemis/pull/4502#discussion_r1221728080
##########
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java:
##########
@@ -928,6 +917,35 @@ private ActiveMQMessageConsumer createConsumer(final
ActiveMQDestination dest,
}
}
+ private SimpleString createFullyQualifedNamedQueue(ActiveMQDestination dest,
+ SimpleString coreFilterString,
+ AddressQuery response) throws
ActiveMQException, JMSException {
+ SimpleString queueName;
+ queueName = CompositeAddress.extractQueueName(dest.getSimpleAddress());
+ if (!response.isExists() ||
!response.getQueueNames().contains(AutoCreateUtil.getCoreQueueName(session,
dest.getSimpleAddress()))) {
+ if (response.isAutoCreateQueues()) {
+ try {
+ createQueue(dest, RoutingType.MULTICAST,
dest.getSimpleAddress(), coreFilterString, true, true, response);
+ } catch (ActiveMQQueueExistsException e) {
+ // The queue was created by another client/admin between the
query check and send create queue packet
+ }
+ } else {
+ throw new InvalidDestinationException("Destination " +
dest.getName() + " does not exist");
+ }
+ } else {
+ QueueQuery queueQuery = session.queueQuery(queueName);
+
+ if (!queueQuery.isExists()) {
+ throw new InvalidDestinationException("Destination " + queueName +
" does not exist");
+ }
+
+ if (coreFilterString != null &&
!queueQuery.getFilterString().equals(coreFilterString)) {
Review Comment:
You changed it further by actually adding the reverse-check, so that this
seems to be saying that if you have a queue with a filter defined on it, you
can attach a 'normal consumer' without a filter to that queue...but you cant
connect an 'FQQN consumer' to that same queue unless it has a filter defined?
If thats true it seems a bit weird.
--
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]