How to read JMS messages without consuming them - using ActiveMQ
I would like to know if there is any way to read a jms and actibemq messages without consuming it ?? I know messages can be consumed from the queue , yet still I want ask this question .!! You can browse Messages on a Queue via the JMS QueueBrowser, or in ActiveMQ you can browse the contents over JMX or with the commands line tools: ActiveMQ console tools JMS QueueBrowser API ActiveMQ JMX Narasimha Reddy Lomadi Rather than using Message-consumers you need to use the QueueBrowser class for doing this: ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://127.0.0.1:61616");