clebertsuconic commented on code in PR #4502:
URL: https://github.com/apache/activemq-artemis/pull/4502#discussion_r1221604281


##########
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

Review Comment:
   this is only for an edge case where another thread may have created the 
queue, probably during a failover thing.
   
   The normal flow of operation is that if there is no address there won't be a 
queue.
   
   
   I'm changing the method to return upon createQueue called because once i saw 
this my OCD wants to fix it.. but I don't think it's an actual issue... but it 
will be fixed anyway.



-- 
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]

Reply via email to