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

Router's default release strategy is affected when a Filter drops a message because the sequence size is not modified.

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.3
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None

      Description

      Adding a filter to sift out invalid messages doesn't modify the header's sequence size.

      A Router's release strategy that relies on the total sequence size (the default behavior) will never be released because the total number of messages will never be completed because the filter has dropped one of the messages (assuming it's invalid).

      For example, if we have four incoming messages. One gets dropped. We now have three remaining messages. The sequence size for all these messages is still set to 4.

      Now the release strategy will only release these messages if the the sequence size is equal to 4. But now we only have 3 messages. So the Router has no way of knowing when to release the messages.

      As a workaround, I have to pass the invalid message to the Router for the purpose of the release strategy as suggested by Mark Fisher.

      See the following guide for the downloadable project that implements a workaround for this issue: http://krams915.blogspot.com/2011/03/spring-integration-2-integrating-jdbc.html

        Attachments

          Activity

            People

            Assignee:
            abilan Artem Bilan
            Reporter:
            skram Mark Serrano
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: