Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-2014

Auto-completion of the Message group and race condition between the Reaper and discard-channel

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Works as Designed
    • Affects Version/s: 2.0.5
    • Fix Version/s: 2.1 M2
    • Component/s: Core
    • Labels:
      None

      Description

      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())
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                oleg.zhurakousky@springsource.com Oleg Zhurakousky
                Reporter:
                oleg.zhurakousky@springsource.com Oleg Zhurakousky
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: