What happens if I have a duplicated message ID in the SQSBatchItemFailure

0

What happens if I mistakenly add the same message ID to the SQSBatchItemFailure list in my lambdas event response?

viduka
gefragt vor 3 Monaten178 Aufrufe
1 Antwort
0

It will cause that message to be retried.

When Lambda processes a batch of SQS messages and encounters an error processing one of the messages, it will report the failed message ID back to SQS. If the same message ID is reported multiple times, SQS will keep returning that message to Lambda for processing.

Some key points:

Lambda follows an at-least-once delivery model for SQS integration. Messages may be delivered multiple times on failure or timeout.

Your Lambda function code needs to be idempotent to handle duplicate message delivery without errors.

Tracking state to avoid duplicate processing on retries is recommended, such as with DynamoDB.

Messages will be sent to the dead letter queue if the max receive count is exceeded due to failures.

Check your Lambda function code and logs to ensure errors are not falsely reported for messages.

profile picture
EXPERTE
beantwortet vor 3 Monaten
  • so if I return 2 failures with the same id I will end up with to messages two be "reprocessed" in the DLQ for exemple?

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen