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