activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DrewB <>
Subject Broker restarts can cause loss of broker redelivered messages
Date Tue, 21 May 2013 23:52:52 GMT
I'm attempting to use broker redelivery to redeliver messages that could not
be processed initially by the consumer.  The behavior is expected under most
circumstances, but I've observed some behavior in cases where a broker is
restarted while scheduled retries are pending that won't work for me. 
Specifically, it appears that the broker only processes a scheduled job if
it is running at the time the job is scheduled to execute.

As an example, a message is scheduled for retry at 1:30:00 with a 5 minute
delay.  This results in a scheduled execution time of 1:35.  If the broker
is shut down, then started again before 1:35, the scheduled job still
exists.  It is executed at 1:35 as expected and the message arrives at the
target destination.  However, if the server is started again after 1:35, the
broker appears to regard the job as no longer relevant and discards the

In my case, this results in a lost message that needed to be processed.  It
would be preferable if the job were executed immediately in the event that
its execution time has already past at start up.  I can certainly see other
job scenarios being relevant, where in a scheduled job should only be
executed precisely at its allotted time, but for retries this seems

Is there any mechanism to work around the behavior I'm seeing?  I am using
ActiveMQ 5.8.


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

View raw message