-
Notifications
You must be signed in to change notification settings - Fork 2
add ackOnMessageError #15
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
base: master
Are you sure you want to change the base?
Conversation
README.md
Outdated
| ``` js | ||
| { | ||
| "queue": { // object, required | ||
| "ackOnMessageError": "" // boolean, optional, (send ack when handle funcrion failed, default true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
funcrion => function. Also, if its boolean dont set empty string in the esxmaple
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| this.emit('message', { type: jsonMessage.type, status: messageStatuses.proceed }); | ||
| } catch (error) { | ||
| this.emit('error', error); | ||
| if (!this.options.ackOnMessageError) throw error; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its not clear from the name of the variable that you are going to throw an error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the error is for cancelling the handling and send the message to sqs again, so queue-router will handle this message again next time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in this way i am "sending nack"
No description provided.