For various reasons my consumer on AWS sometimes reads a few messages from an SQS queue and decides to put some of them back in the queue to be processed later.
The way I do that is by setting their VisibilityTimeout
to 0 which makes them immediately visible to other consumers. This is documented here.
The problem is that after doing that a few times, the message's ReceiveCount
reaches the maxReceiveCount
which causes the message to be moved to the DLQ. I'm wondering if I can somehow reset the message's ReceiveCount
to avoid that.
The only option I can currently think of is to just send a copy of the message back to the beginning of the queue and deleting the original message.