More detail
You set maxReceiveCount on the source queue’s redrive policy. Once a message has been received that many times without being deleted, SQS moves it to the DLQ. You can inspect it there, fix the bug and “redrive” it back. A DLQ must be the same type as its source (standard or FIFO).