Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants