Skip to content
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

Catch clause catches error which means that message will not go back to queue. #16

Open
MathiasHaudgaard opened this issue Oct 15, 2020 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@MathiasHaudgaard
Copy link

MathiasHaudgaard commented Oct 15, 2020

} catch (err) {
this.events.emit(SqsConsumerEvents.processingError, { err, message });
}

when integrating with lambda the above catch clause catches the error which causes the message to be removed from queue eventhough there was an error. Can you fix this?

Btw, really nice work on this package! 👍

@mzahor
Copy link
Contributor

mzahor commented Dec 17, 2020

Hi @MathiasHaudgaard, good catch. We'll fix it. Thanks!

@mzahor
Copy link
Contributor

mzahor commented Dec 17, 2020

Just realized that this fix will break a normal usage (outside lambda). Regarding lambda, I think subscribing to this event in the lambda and throwing an error should fix the issue. Just need to test it and update the docs.

@mzahor mzahor added the documentation Improvements or additions to documentation label Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants