franz1981 commented on a change in pull request #2998: ARTEMIS-2641 Openwire 
client runs out of credits after reconnection
URL: https://github.com/apache/activemq-artemis/pull/2998#discussion_r387528013
 
 

 ##########
 File path: 
artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java
 ##########
 @@ -380,6 +383,11 @@ public void setPrefetchSize(int prefetchSize) {
       this.prefetchSize = prefetchSize;
       this.currentWindow.set(prefetchSize);
       this.info.setPrefetchSize(prefetchSize);
+      if (this.prefetchSize == 0) {
+         messagePullHandler.compareAndSet(null, new MessagePullHandler());
 
 Review comment:
   that can happen if: 
   
   1. there is a racing thread doing it 
   2. the value isn't null
   
   in both cases probably logging some trace/debug is ok if we expect it to 
happen?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to