Could you provide any example for routing messages in Spring Integration?. Filter by payload message, header or something like the following:
<int:payload-type-router input-channel="routingChannel">
<int:mapping type="java.lang.String" channel="channel1" />
<int:mapping type="java.lang.Integer" channel="channel2" />
</int:payload-type-router>
How the response works? I mean, if I send:
channel -> router -> transformer -> gateway
Simple but I am looking something similar to this example:
<int:router input-channel="inChannel" expression="payload.paymentType">
<int:mapping value="CASH" channel="cashPaymentChannel"/>
<int:mapping value="CREDIT" channel="authorizePaymentChannel"/>
<int:mapping value="DEBIT" channel="authorizePaymentChannel"/>
</int:router>
When my gateway receives a message and sends the response to reply channel. How can I inform in my router what is the correct reply channel?