Spring Integration
  1. Spring Integration
  2. INT-1129 Refactor MessageChannelTemplate and gateway classes
  3. INT-1301

MessagingTemplate send methods should return void but throw exceptions for timeouts, etc.

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 2.0 M7
    • Component/s: Core
    • Labels:
      None

      Description

      Currently, MessagingTemplate send methods return the boolean value as returned by the underlying MessageChannel send() method. At the template level, we should actually always throw an Exception for 'false' returns there. Most likely this would be a "timeout" condition (otherwise the underlying channel would already be throwing a runtime Exception that simply propagates).

      If someone has a real need to send and handle a false return for timeouts, they should be working at a lower level, directly with the MessageChannel itself. However, since the MessagingTemplate is used in many places within the framework, such as the MessageHandler implementations, we need to close the gap where a handler implementation (e.g. service-activator or transformer) might silently fail to send a reply Message to its output-channel. By throwing runtime Exceptions we would instead cause those cases to produce a fatal condition for an entire message flow.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Mark Fisher
            Reporter:
            Mark Fisher
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: