title: Spring Integration: Content based router with default output channel?
body: <p>I'd like use Spring Integration to implement a content based router that uses a default output channel if the expression value doesn't match any of the mappings. Here's my bean definition:</p>
  
  <pre><code>&lt;int:router input-channel="channel_in" default-output-channel="channel_default" expression="payload.name"&gt;
      &lt;int:mapping value="foo" channel="channel_one" /&gt;
      &lt;int:mapping value="bar" channel="channel_two" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>However, it seems the default output channel is never used. If the expression evaluates to e.g. 'baz', the router seems to be looking for a channel named 'baz', instead of routing to the 'channel_default' channel:</p>
  
  <pre><code>org.springframework.integration.MessagingException: failed to resolve channel name 'baz'
    Caused by: org.springframework.integration.support.channel.ChannelResolutionException: 
      failed to look up MessageChannel bean with name 'baz'
    Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: 
      No bean named 'baz' is defined
  </code></pre>
  
  <p>Is what I want at all possible using the XML namespace, or do I need to code up my own implementation?</p>