spring-cloud-aws
spring-cloud-aws copied to clipboard
Enable receiving messages from different message groups in the same Batch for FIFO queues
See https://github.com/awspring/spring-cloud-aws/issues/1020
For this we need to add a ContainerOptions
to use in the FifoSqsComponentFactory
to determine the proper Sink
composition.
Hello @tomazfernandes ,
From what I've seen and in relation to your messages, I think we should add an option in SqsContainerOptions
to not use the MessageGroupingSinkAdapter
but another one that doesn't group by message group.
Is that right? If yes, I can do it ! Thanks !
Hey @alexisgra, yup, that sounds about right!
Go for it, I'll be happy to look at the PR.
Hi @tomazfernandes, Thanks for your answer! I'm currently working on the PR. I was wondering if I should expose a property in the @SqsListener annotation? Or just in the factory? From what I understand from #1020, the use case may seem rather edgy. Moreover, the property only makes sense for FIFO queues with a BATCH listener.
For now, I've added a boolean messageGrouping
field to the SQSContainerOptions
, which defaults to true and is used in the FifoSqsComponentFactory
to choose the right Sink
composition.
Thanks for your help !