Description
If we have a batch of messages 5-10 and message 7 is tagged as RSVP, then the logic in RSVP.up(MessageBatch) will do the following:
- Iterate through the batch
- If a message is marked as RSVP: remove it and pass it up (msg 7)
- The pass the batch up
- This means we'll pass up message 7 first, then messages 5,6,8,9,10
--> Incorrect order
SOLUTION:
- We cannot pass up RSVP messages directly
- Instead, remember the RSVP IDs of the messages in the batch which were marked as RSVP
- When done, send an RSVP response for each of these IDs