Search code examples
javaloggingactivemq-classicconsumer

Consume activemq to a log but keep the message in the queue


I have an activeMQ app. I want to read the body of incoming messages, but keep the message into the queue. How do I do that? Is there any trick?


Solution

  • You can use message browsing feature of ActiveMQ by using ActiveMQQueueBrowser

    http://activemq.apache.org/maven/apidocs/org/apache/activemq/ActiveMQQueueBrowser.html