You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2021/01/14 05:06:31 UTC
[activemq] branch activemq-5.16.x updated: [AMQ-7443] Add
connection remote addr in the prefetch warn log message
This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch activemq-5.16.x
in repository https://gitbox.apache.org/repos/asf/activemq.git
The following commit(s) were added to refs/heads/activemq-5.16.x by this push:
new 71be503 [AMQ-7443] Add connection remote addr in the prefetch warn log message
71be503 is described below
commit 71be5034478887f49302bdb72eb384346b403fdc
Author: jbonofre <jb...@apache.org>
AuthorDate: Wed Jan 13 06:23:28 2021 +0100
[AMQ-7443] Add connection remote addr in the prefetch warn log message
(cherry picked from commit 7339e0516c39fe6736e8afd201bf176bbdd83950)
---
.../java/org/apache/activemq/broker/region/TopicSubscription.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java
index 6f654a4..41c6a48 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java
@@ -116,7 +116,11 @@ public class TopicSubscription extends AbstractSubscription {
if (info.getPrefetchSize() > 1 && matched.size() > info.getPrefetchSize()) {
// Slow consumers should log and set their state as such.
if (!isSlowConsumer()) {
- LOG.warn("{}: has twice its prefetch limit pending, without an ack; it appears to be slow", toString());
+ String remoteAddr = null;
+ if (context != null && context.getConnection() != null) {
+ remoteAddr = context.getConnection().getRemoteAddress();
+ }
+ LOG.warn("{}: has twice its prefetch limit pending, without an ack; it appears to be slow{}", toString(), (remoteAddr != null) ? ": " + remoteAddr : "");
setSlowConsumer(true);
for (Destination dest: destinations) {
dest.slowConsumer(getContext(), this);
@@ -133,7 +137,7 @@ public class TopicSubscription extends AbstractSubscription {
return;
}
if (!warnedAboutWait) {
- LOG.info("{}: Pending message cursor [{}] is full, temp usag ({}%) or memory usage ({}%) limit reached, blocking message add() pending the release of resources.",
+ LOG.info("{}: Pending message cursor [{}] is full, temp usage ({}%) or memory usage ({}%) limit reached, blocking message add() pending the release of resources.",
new Object[]{
toString(),
matched,