activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johnd <>
Subject Persistent messages moving to DLQ when consumer not active
Date Wed, 22 Jan 2014 17:45:45 GMT

I have an issue where persistent messages on a queue are being moved to the
DLQ when there is no active consumer on the queue. I am not sure if this is
an issue with activeMQ or Camel.

The set-up is as follows: messages or put onto a queue in an embedded broker
which is bridged to a standalone broker. From here, it is first routed to a
topic, and from there onto one or more queues to be processed by the
consumers. This works ok when all components are active, but if the
consumers are down then I can see the message appear on the queue and then
get moved to the DLQ a few seconds later. Why is this - why do the messages
not stay in the queue to be picked-up by the consumers when they are active?

The producer (JmsTemplate) is set to persistent delivery with a timeToLive
set to 691200000, and I have tried with explicitQosEnabled set to both true
and false:

Camel routes are:

So, when there is no consumer on the Client1.Events or Client2.Events
queues, the messages get moved to the DLQ. Why is this? What do I have to
do/set for the messages to stay on this queue until they are picked-up by a

>From monitoring (using ActiveMW web console) the queues, I can see that it
takes approx 30 seconds for the message to be moved to the DLQ (default
message ttl?). However, if I bring up a consumer on the queue before this
time, it seems that the message is moved to the DLQ as soon as (or just
before) the consumer connects to the queue.

The following messages are logged when the broker moves the messages to the

Note that the "expiration" time is 1390408849014 (1 second after the
timestamp), so it looks like the time-to-live that I have set is being lost
somewhere in transit. Is this not preserved automatically when routed?
I have also tried adding 'preserveMessageQos=true' to all the camel routes,

This does not seem to make any difference.

Do I need to configure the consumer somehow to let the broker know to
deliver old (i.e. those put on the queue before the consumer is started)

I think i have provided all the relevant information - let me know if you
need to know anything else.

Thanks in advance,


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message