Skip to content

@FifoQueueListener retry does not work when FIFO queue has messages of same message group id #369

@johnnycashash

Description

@johnnycashash

Using @FifoQueueListener with concurrency of 10 in spring boot application.

SQS FIFO queue has configured visibility timeout of 10 seconds and configured DLQ with max receives count 3.

First: Putting 2 messages in FIFO queue with same message group id and different deduplication id.
Second: Starting Spring boot consumer @FifoQueueListener application.

3 attempts are done on 1st message dropped in queue as exception is thrown from the process. But not noticing any attempt done on 2nd message and sometimes 3 attempts(APPROXIMATE_RECEIVE_COUNT -1,2,3) done on 1st message and only one attempt done on 2nd message(APPROXIMATE_RECEIVE_COUNT - 3).

And finally both messages end up in DLQ.

Expectation should be 3 attempts done on both the messages before putting messages in DLQ.

Noticed that on application start, both messages move to inflight(means both are read in 1st poll).
Maybe the poller for @FifoQueueListener keeps on increasing the receive count of 2nd message while first message attempts are going on.

Also tried increasing the visibility on sqs to 1 hour and overriding visibility to 5 seconds in @FifoQueueListener.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions