I am using client acknowledgements with a prefetch size of 1 with no message expiration policy. When a consumer subscribes to a queue I can see that the message gets dispatched correctly. If the process gets killed before retrieving and acknowledging the message I see the message getting re-dispatched (correctly). I expected this same behaviour if the host running the process gets rebooted or crashes. However, after reboot I can see that the message is stuck in the dispatched state to the consumer that is long gone. Is there a way that I can get messages re-dispatched when a host hosting consumer processes gets re-booted? How does it detect the case when a process dies (even with SIGKILL)?

I did notice that if I increase my prefetch size and enqueue another message after the reboot, that activemq will re-dispatch the original message. However with prefetch size equal to one the message never seems to get re-dispatched.

Reply via email to