If downloadInputChannel is a direct channel, and all downstream channels from there are direct channels then, yes, any downstream exception will be caught by the gateway and an ErrorMessage will be put on the error-channel.
The payload of the ErrorMessage is a MessagingException which has two properties:
* failedMessage - the message that failed
* cause - the original exception
To send keepalives use something like
Notice the single quotes around the literal SpEL expression.
<int:inbound-channel-adapter id="heartbeat" expression="'<ok/>'" channel="toReceiver" >
<int:poller fixed-delay="5000" />
You can, of course, reference a bean and method to get the content, instead of using an expression.
Gary P. Russell
Spring Integration Team
SpringSource, a division of VMware