Skip to content

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

@carera

Description

@carera

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions