Let's say I have a FIFO SQS, and a lambda which consumes a batch of messages from the FIFO SQS. The max limit on the size of this batch is 10, as mentioned here. I was wondering how this would work.
Let's say we have some message group ID G, because of which we have 5 messages groups - G1, G2, ..., G5.
Let's say we have set the batch size as 10. So that would mean at a time, more than one message would be required to be picked up from each group. So let's say we have two messages M1 and M2 inside G1. M1 came first, and M2 came afterwards.
But since we are getting both of these messages in the same batch, they might get processed out of order.
Is this the correct expectation? Or would the FIFO queue only put 5 messages in the batch, and send that to the lambda?