michaelpearce-gain 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_r387529034
##########
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:
if its not null, we dont want to change it. e.g. the case there is client
was already at prefetch 0 and simply sent a second update which set it to the
same size, as such you want to leave the original pullhandler.
----------------------------------------------------------------
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