sqs-consumer icon indicating copy to clipboard operation
sqs-consumer copied to clipboard

Individual failures are not checked on deleteMessageBatch

Open AntonioJuliano opened this issue 6 years ago • 2 comments

Description

In consumer#deleteMessageBatch when batch deleting messages individual failures are not checked. As per the AWS docs "Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200"

Expected behaviour

The return value of this.sqs.deleteMessageBatch in the callback specifies a list of failed IDs, which should be validated to be empty. If any IDs fail, they should either be retried or the error should be surfaced

Actual behaviour

Individual failures are silent

Steps to reproduce

Have AWS return a non-empty Failed array

AntonioJuliano avatar Nov 13 '19 20:11 AntonioJuliano

Also, the same thing with terminateVisabilityTimeoutBatch

AntonioJuliano avatar Nov 13 '19 20:11 AntonioJuliano

@AntonioJuliano - thanks for raising this issue.

nspragg avatar May 12 '20 08:05 nspragg

I believe this will be resolved at the same time as this issue:

https://github.com/bbc/sqs-consumer/issues/245

Which is to return a list of successful messages, which when compared would also give you a list of failed messages.

Feel free to reopen if that doesn't resolve this issue.

nicholasgriffintn avatar Dec 16 '22 16:12 nicholasgriffintn