allthingssecurity commented on code in PR #30911:
URL: https://github.com/apache/camel/pull/30911#discussion_r4716905537


##########
components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/TemporaryQueueReplyManager.java:
##########
@@ -442,8 +448,11 @@ public Destination resolveDestinationName(Session session, 
String destinationNam
         }
 
         public void scheduleRefresh() {
-            refreshGeneration.incrementAndGet();
+            // clear replyTo before the new generation is visible: a consumer 
that resolves this generation publishes
+            // its queue after this write, so the late null cannot overwrite 
the new queue (no refresh would be pending
+            // any more, and replyTo would stay null until the next connection 
failure)
             replyTo = null;

Review Comment:
   Thanks. This PR is merged now; it is a comment-only point, so I will fold it 
into the next change in this area rather than open a separate PR.



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