Describe the bug
In our application we are using multiple SqsListener annotations to retrieve sqs messages from FIFO and non-FIFO queues. We are using the default setting for maxNumberOfMessages (10) in order to keep the number of requests made to AWS as low as possible.
The messages retrieved from FIFO queues with same messageGroupId are processed concurrently. We are expecting these groups messages to be processed one after another.
The reason for this behaviour is that the messages are retrieved in a bulk of 10 (maxNumberOfMessages) and even though AWS delivers messages with same messageGroupId in the order they have been put into the queue, the SimpleMessageListenerContainer ignores the order within the group and treats all messages equally. All messages are put into the ThreadPool and thus are processed concurrently.
Type: Bug
Component: SQS
Describe the bug In our application we are using multiple SqsListener annotations to retrieve sqs messages from FIFO and non-FIFO queues. We are using the default setting for maxNumberOfMessages (10) in order to keep the number of requests made to AWS as low as possible.
The messages retrieved from FIFO queues with same messageGroupId are processed concurrently. We are expecting these groups messages to be processed one after another.
The reason for this behaviour is that the messages are retrieved in a bulk of 10 (maxNumberOfMessages) and even though AWS delivers messages with same messageGroupId in the order they have been put into the queue, the SimpleMessageListenerContainer ignores the order within the group and treats all messages equally. All messages are put into the ThreadPool and thus are processed concurrently.
Project: spring-cloud-aws/spring-cloud-aws-messaging Version: 2.x.x