3

I have declared int:chain with single input and output channel,

<int:chain input-channel="InputChannel" output-channel="Channel">

      <int:transformer method = "transform" >
        <bean class="com.sampleconverter" />
      </int:transformer>
        <int:service-activator method="transform">
             <bean class="com.Transformer" />
        </int:service-activator>
     <int:object-to-string-transformer />
   </int:chain>

How to declare multiple output-channel each having different transform methods (different messages)

Thanks in advance

Vigneshwaran
  • 782
  • 2
  • 7
  • 22

1 Answers1

0

Only one component in Spring Integration has multi output - router.

So, you can configure it in the end of the chain and let it to decide to which channel to send the message by the provided condition.

For example:

<payload-type-router>
    <mapping type="java.lang.String" channel="strings"/>
    <mapping type="java.lang.Number" channel="numbers"/>
</payload-type-router>

More info in the Reference Manual and in the Samples.

Artem Bilan
  • 113,505
  • 11
  • 91
  • 118