diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java index 39f383d852..cd2fd49783 100644 --- a/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java +++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java @@ -2428,13 +2428,13 @@ public interface AuditLogger extends BasicLogger { void logCoreSendMessage(String user, String messageToString, Object context); //hot path log using a different logger - static void coreConsumeMessage(Subject user, String queue) { - MESSAGE_LOGGER.consumeMessage(getCaller(user), queue); + static void coreConsumeMessage(Subject user, String queue, String message) { + MESSAGE_LOGGER.consumeMessage(getCaller(user), queue, message); } @LogMessage(level = Logger.Level.INFO) - @Message(id = 601501, value = "User {0} is consuming a message from {1}", format = Message.Format.MESSAGE_FORMAT) - void consumeMessage(String user, String address); + @Message(id = 601501, value = "User {0} is consuming a message from {1}: {2}", format = Message.Format.MESSAGE_FORMAT) + void consumeMessage(String user, String address, String message); /* * This logger is focused on user interaction from the console or thru resource specific functions in the management layer/JMX diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java index 6c4519bd92..cf56345632 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java @@ -494,7 +494,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { Message message = reference.getMessage(); if (AuditLogger.isMessageEnabled()) { - AuditLogger.coreConsumeMessage(session.getRemotingConnection().getAuditSubject(), getQueueName().toString()); + AuditLogger.coreConsumeMessage(session.getRemotingConnection().getAuditSubject(), getQueueName().toString(), reference.toString()); } if (server.hasBrokerMessagePlugins()) { server.callBrokerMessagePlugins(plugin -> plugin.beforeDeliver(this, reference));