Project: springxd
Issue XD-671: Add support for dynamic routing
It should be possible to create streams like the following which rely upon named channel support and dynamic routing capabilities: {code} http | somerouter :x > xtransformer | hdfs :y > ytransformer | hdfs {code} The 'somerouter' processor could return "x" or "y" which determines the downstream path for each message. This should be implemented in such a way that any developer adding a router module would only need to deal with existing Spring Integration semantics (in this case, only considering the return of "x" or "y" - whether it be SpEL or a POJO method invocation). Perhaps in the plugin that modifies a module context, we could simply add a new ChannelResolver implementation (by adding that ChannelResolver as a bean and/or a BeanPostProcessor that configures that as the resolver for any router, if necessary). That ChannelResolver would have a reference to the ChannelRegistry so that the router actually sends its messages to those shared channels. The shared channels themselves would have been created as long as a valid downstream flow has been defined.
Story points: 16