taoensso / carmine

Redis client + message queue for Clojure
https://www.taoensso.com/carmine
Eclipse Public License 1.0
1.16k stars 131 forks source link

Handling locked messages after JVM crash #294

Closed marioaquino closed 7 months ago

marioaquino commented 7 months ago

Do you have any advice for handling situations where messages are effectively locked indefinitely after a JVM crash? The situation I'm describing is one where a worker has started processing a message event and the app where the worker is running crashes without graceful shutdown.

ptaoussanis commented 7 months ago

@marioaquino Hi Mario!

Could you please clarify some details?:

  1. Are you talking about using Carmine's message queue feature?
  2. What version of Carmine are you using?
  3. What makes you believe that the message is "locked indefinitely"? That wouldn't be normal behaviour, Carmine's message queue is fault tolerant - locks will automatically expire after some time (specified in the enqueue call) if a handler crashes.

Edit to add: the default lock time is 60 minutes if you haven't explicitly specified anything different with your enqueue call or worker options.

marioaquino commented 7 months ago

@ptaoussanis Peter,

I think I was wrong in the preface of my question. I am using the latest version of carmine and using the message_queue feature. In my testing, I am indeed seeing messages picked up after crashing the JVM. My concerns are addressed. Thanks for the quick response!

ptaoussanis commented 7 months ago

No worries, thanks for the confirmation. Cheers! :-)