activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "art.licis" <arturs.li...@gmail.com>
Subject Re: Using ActiveMQ with more than one consumer instance
Date Wed, 17 Oct 2018 18:16:07 GMT
Hi Moshe,

Looks like the problem is about how you consume messages. Instead of using
regular subscribe approach, you retain messages using queue browser:

QueueBrowser queueBrowser = consumerSession.createBrowser(queue);
Enumeration msgs = queueBrowser.getEnumeration();

This is wrong. Queue browser's purpose is to look at messages without
actually removing them from a queue. Therefore, your messages stay in the
queue and remain available for other consumers.

- Art




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Mime
View raw message