clebertsuconic commented on code in PR #4502:
URL: https://github.com/apache/activemq-artemis/pull/4502#discussion_r1221593509
##########
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:
@[clebertsuconic](https://github.com/clebertsuconic) clebertsuconic
[now](https://github.com/apache/activemq-artemis/pull/4502#discussion_r1221592602)
@gemmellr I made a few mistake with my git local repo and I lost a change
where this was supposed to be
!coreFilterString.equals(queueuQuery.getFilterString()).
I will add a test.
--
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]