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!
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
computeis 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
AmazonSQSExceptionis 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!