activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DrewB <1a2w...@gmail.com>
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
message.

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
counterintuitive.

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

Thanks,
Andrew



--
View this message in context: http://activemq.2283324.n4.nabble.com/Broker-restarts-can-cause-loss-of-broker-redelivered-messages-tp4667312.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message