activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marius <>
Subject Strange behavior for persisted & not consumed & redelivered messages – activemq 5.5.0
Date Mon, 18 Apr 2011 21:17:55 GMT

I have configured ActiveMQ 5.5.0, Spring 3 and Tomcat 5.x to redeliver
persisted messages every 5 mins. Everything works fine, except the case when
I restart Tomcat and there are still messages which need to be consumed.

Please consider the following test scenario:
- 15 messages are sent to the queue; 5 are consumed & 10 remain in the queue
because of some exception (I have sessionTransacted=true). In the logs I can
see all the 10 remaining messages are subject for re-delivery every 5 mins.
… so good so far  (enqueueCount=15, dequeueCount=5)
- I restart tomcat, but in the logs only 3 (sometimes 4, sometime 1 … just
randomly from my understanding) JMS messages are redelivered on Tomcat
startup and then every 5 mins (after restart, only the 3 messages look to be
re-delivered). If none of the 3 JMS messages is successfully redelivered,
ActiveMQ doesn’t look up for other 7 messages that need to be redelivered
too (it still tries to redeliver the first messages which were “detected” on
startup). As soon as a message is successfully re-delivered, the other
messages are “available” again and the redelivery functionality seems to
start working normal again.

How can configure the number of messages which are redelivered on tomcat
restart (basically the unconsumed messages persisted in the ActiveMQ
persistence storage). Currently there are 1,2,3 .. 4 … messages redelivered
– randomly number.

Attached you can find my configuration file.


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

View raw message