diff --git a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java index 9e534a2d83..1ecad0c4c9 100644 --- a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java +++ b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java @@ -348,8 +348,11 @@ class AmqpProtocolConverter { MessageDispatch md = (MessageDispatch) command; ConsumerContext consumerContext = subscriptionsByConsumerId.get(md.getConsumerId()); if (consumerContext != null) { - if (LOG.isTraceEnabled()) { + // End of Queue Browse will have no Message object. + if (LOG.isTraceEnabled() && md.getMessage() != null) { LOG.trace("Dispatching MessageId:{} to consumer", md.getMessage().getMessageId()); + } else { + LOG.trace("Dispatching End of Browse Command to consumer {}", md.getConsumerId()); } consumerContext.onMessageDispatch(md); }