activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <>
Subject Re: Stop and resume message consuming
Date Tue, 06 Aug 2013 15:32:35 GMT
I think you're on the right track. As long as you're using exclusive
consumer, only one consumer will be actively consuming from the queue at a
time. You could use individual ack, or you could also use transacted
sessions. By not sending the ack back, your consumer will not proceed to
the next message. You could even set prefetch low (0 or 1) so that messages
don't get dispatched to the broker until the consumer has ack'd the
previous message.

On Tue, Aug 6, 2013 at 2:07 AM, retok <> wrote:

> We have a use case where there is a single queue that has multiple message
> consumers. It is important that the messages are consumed in
> first-in-first-out order and message consuming must stop when a message
> cannot be acknowledged (e.g. due to an application/database error) and must
> not be resumed until the problem has been solved. Consuming must be resumed
> with the not acknowledged message.
> To guarantee ordering when multiple consumers are around, we assume that we
> need to use the exclusive consumer feature of ActiveMQ. To have control
> over
> message acknowledgement, we assume that we need to use
> But now, how can we achieve that message consuming is stopping whenever we
> do not acknowledge a message?
> And how can we resume consuming messages after the application/database
> error has been resolved (not knowing which consumer was the exclusive
> consumer)?
> None of the consumer needs to die upon an error of the application/database
> behind, so failover is not the topic of this question.
> Thanks for any help,
> Reto
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at

*Christian Posta*
twitter: @christianposta

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message