0

I'm trying to understand what is the best way to implement some sort of Observability for DLQs.

I know it's possible to have some monitoring (e.g.: There are 3 messages in the DLQ XYZ)

I'm trying to understand if there's a way to know what happened by getting some metadata in the DLQ and keep the message there after getting what i need.

I tought about a basic approach to do that, but I don't think that is the better way:

Use a Lambda to get the metadata, send it this metadata to somewhere (CloudWatch Logs, New Relic, etc.) with error informations - but this approach will a way to mark the message as processed after getting what I need from the message to keep it in the DLQ.

Have anyone implemented something like that? Or, does anyone have a suggestion to this approach?

Appreaciate your time!

jonathanlima
  • 159
  • 2
  • 9
  • Do you want to read the message and keep it in the DLQ? I think you can do that by calling ReceiveMessage without calling DeleteMessage. When you receive a message it stays invisible in the queue until you delete it. If the queue's visibility timeout elapses before you delete it, the message becomes visible and receivable again. SQS deletes the message anyway when the retention period elapses. – Iain Samuel McLean Elder Sep 01 '23 at 21:32

0 Answers0