Sqs metric numberofmessagesreceived growing

Viewed 456

Number Of Messages Received is larger in SQS as compared to Number of messages sent. Almost from a month my count for both the above metric that is number of messages received and sent are equal but suddenly the number of messages received count started increasing as compared to number of messages sent.

As per my understanding number of messages sent is the count of messages added to the SQS and number of messages received is the count of number of messages received by the consumer. So how the number of received messages can be larger than sent messages. Also the approximate number of visible messages are growing. Can anyone please help by explaining how this can happen.

Thanks in advance.

1 Answers

The metric includes retries. From docs:

These metrics are calculated from a service perspective, and can include retries. Don't rely on the absolute values of these metrics, or use them to estimate current queue status.

So your application may be trying to process same messages multiple types.

Related