Skip to content

nack inside catch clause causes issue in case of failure #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
carera opened this issue Jun 18, 2022 · 0 comments
Open

nack inside catch clause causes issue in case of failure #56

carera opened this issue Jun 18, 2022 · 0 comments

Comments

@carera
Copy link

carera commented Jun 18, 2022

Hello,

we recently stumbled upon an issue with the worker processing messages in a go-loop:

https://github.com/TheClimateCorporation/squeedo/blob/master/src/com/climate/squeedo/sqs_consumer.clj#L68-L77

as the worker is working through messages, the compute is wrapped in a try/catch block. In case of an error, the catch clause attempts to nack the message.

The problem occurs when the nack fails and throws as well (e.g. due to the message being expired or something, an AmazonSQSException is thrown). As this error is uncaught, it bubbles outside the go-loop. This results in the worker getting stuck and no more messages are processed.
I was wondering, is this the expected behaviour?

Thank you!

@carera carera changed the title nack inside catch clause causes issue when failed nack inside catch clause causes issue in case of failure Jun 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant