-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Oleg Zhurakousky opened INT-2014 and commented
MessageGroup is considered complete if it has accumulated the amount of messages specified by the sequenceSize. However CorrelatingMessageHandler can still return 'false' on canRelease() call if custom release strategy is provided. For example, i may want to batch up messages in groups (as the use case in the forum) of 5 while my sequence size is 7. This means that the first batch of 5 messages will be released as soon as MessageGroup has 5 messages. The other two Messages will complete the MessageGroup and based on the current code in CorrelatingMessageHandler these two Messages will be sent to a discard channel unless Reaper gets to them first. So its basically one big race condition with unpredictable results.
This goes back to the mutual exclusivity. If send-partial-result-on-expiry is set to 'true', then CorrelatingMessageHandler should assume that Reaper has control over the MessageGroup and not send messages to the discardChannel
else if (!sendPartialResultOnExpiry && group.isComplete()) instead of what we have now else if (group.isComplete())
Affects: 2.0.5
Issue Links:
- Remove the role of the Sequence Size for the aggregators that are not relying on the default SequenceSizeReleaseStrategy [INT-2134] #6116 Remove the role of the Sequence Size for the aggregators that are not relying on the default SequenceSizeReleaseStrategy