[
https://issues.apache.org/jira/browse/ARTEMIS-2641?focusedWorklogId=397377&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-397377
]
ASF GitHub Bot logged work on ARTEMIS-2641:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 04/Mar/20 09:03
Start Date: 04/Mar/20 09:03
Worklog Time Spent: 10m
Work Description: michaelpearce-gain commented on 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]
Issue Time Tracking
-------------------
Worklog Id: (was: 397377)
Time Spent: 1h 20m (was: 1h 10m)
> Openwire client runs out of credits after reconnection
> ------------------------------------------------------
>
> Key: ARTEMIS-2641
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2641
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Domenico Bruscino
> Priority: Major
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> In an environment using OpenWire NMS clients, after the consumer
> reconnection, we see that messages get prefetched out to the consumer up to
> its default limit (1000); however, after the client acks all the messages
> (and the broker shows 1000 messages acked), the broker still reports the
> consumer is waiting on credits and reports current credits as NULL:
> {code}
> DEBUG [org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl]
> ServerConsumerImpl [id=0, filter=null, binding=LocalQueueBinding
> [address=XXXX, queue=QueueImpl[name=XXXX, postOffice=PostOfficeImpl
> [server=ActiveMQServerImpl::serverUUID=XXXX], temp=false], filter=null,
> name=XXXX, clusterName=XXXX]] is busy for the lack of credits. Current
> credits = null Can't receive reference
> Reference[45099938419]:RELIABLE:CoreMessage...
> {code}
> Looking at a heap from the affected broker, the currentWindow for the
> consumer is "0" though there are no message references in deliveringRefs.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)