[
https://issues.apache.org/jira/browse/ARTEMIS-4362?focusedWorklogId=870680&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-870680
]
ASF GitHub Bot logged work on ARTEMIS-4362:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 12/Jul/23 20:52
Start Date: 12/Jul/23 20:52
Worklog Time Spent: 10m
Work Description: clebertsuconic commented on code in PR #4552:
URL: https://github.com/apache/activemq-artemis/pull/4552#discussion_r1261713360
##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java:
##########
@@ -3298,8 +3306,28 @@ private boolean needsDepage() {
return queueMemorySize.getSize() <
pageSubscription.getPagingStore().getMaxSize() &&
intermediateMessageReferences.size() + messageReferences.size() <
MAX_DEPAGE_NUM;
} else {
- return (maxReadBytes <= 0 || (queueMemorySize.getSize() +
deliveringMetrics.getPersistentSize()) < maxReadBytes) &&
+ boolean needsDepageResult = (maxReadBytes <= 0 ||
(queueMemorySize.getSize() + deliveringMetrics.getPersistentSize()) <
maxReadBytes) &&
(maxReadMessages <= 0 || (queueMemorySize.getElements() +
deliveringMetrics.getMessageCount()) < maxReadMessages);
+
+ if (!needsDepageResult) {
+ if (!pageFlowControlled && (maxReadBytes > 0 &&
deliveringMetrics.getPersistentSize() >= maxReadBytes || maxReadMessages > 0 &&
deliveringMetrics.getMessageCount() >= maxReadMessages)) {
+ if (System.currentTimeMillis() - pageFlowControlledLastLog >
PAGE_FLOW_CONTROL_PRINT_INTERVAL) {
+ pageFlowControlledLastLog = System.currentTimeMillis();
+
ActiveMQServerLogger.LOGGER.warnPageFlowControl(String.valueOf(name),
String.valueOf(address), deliveringMetrics.getMessageCount(),
deliveringMetrics.getPersistentSize(), maxReadMessages, maxReadBytes);
+ }
+ if (logger.isDebugEnabled()) {
+ logger.warn("Queue {}/Address {} is currently delivering {}
messages that are holding {} bytes, with max sizes configured at
addressSettings.maxPageReadMessages={} and addressSettings.maxPageReadBytes={}.
System will not read more data from paging until acks are made. " +
Review Comment:
logger.debug!
Issue Time Tracking
-------------------
Worklog Id: (was: 870680)
Time Spent: 20m (was: 10m)
> Produce a logger when consumers are holding too many messages not allowing
> deposing
> -----------------------------------------------------------------------------------
>
> Key: ARTEMIS-4362
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4362
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Reporter: Clebert Suconic
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> We should add a log.warn whenever the system can't read more messages because
> consumers are holding too many messages in pending state.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)