[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using ActiveMQ with more than one consumer instance

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: