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

MessageTransformingHandler does not (contrary to the manual) act like a filter when null is returned from the transforming delegate

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.2
    • Component/s: Documentation
    • Labels:
      None

      Description

      According to the Spring Integration Reference Manual, 6.1.2 Configuring Transformer:

      "If the return value is null, then no reply Message will be sent (effectively the same behavior as a Message Filter returning false)"

      However, we have found that this is not the case.
      The MessageTransformingHandler class sets 'requiresReply' to true when initialised. which results in the AbstractReplyProducingMessageHandler.handleMessageInternal() method throwing a MessageHandlingException ("handler 'XYZ' requires a reply, but no reply was received")

      My first preference is that MessageTransformingHandler would conform to the manual and behave like a Filter.
      However, this may be a non-backwards-compatible change for some users.

      An acceptable alternative might be to add a 'requires-reply' attribute to the '<transformer/>' element to allow this behaviour to be disabled. (An update to the quoted documentation would also be required in this case.)

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: