#1041 Enable receiving messages from different message groups i… #1134
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…n the same Batch for FIFO queues
📢 Type of change
📜 Description
Added a new SqsContainerOptions option :
messageGrouping
. True by default. When false, a newMessageSinkAdapter
is used. This adapter does not have grouping function.I was wondering whether I should add the new option
messageGrouping
in the@SqsListener
annotation or leave the configuration only in the factory.Although the option is only relevant for FIFO Queues with a listener in
batch
mode, I've decided to put the option in@SqsListener
, which will make it easier for library users to configure.I don't know if the name
messageGrouping
is meaningful enough, I can change it if necessary.💡 Motivation and Context
Fix the issue #1041
💚 How did you test it?
I added a test in
SqsFifoIntegrationTests
. In this test, I configure a new listener withmessageGrouping
set tofalse
. I send several messages from two different message groups.In the listener, I verify that the batch of messages received contains messages from different message groups. Then, I check that all messages from each group have been received.
📝 Checklist
🔮 Next steps