title: Spring Integration inbound-gateway reply-channel has no subscribers for channel
body: <p>I have a trivial "Hello World" example workflow here where I want to expose an <code>inbound-gateway</code> web service that responds in plain text. I believe the way I route the response to <code>myReplyChannel</code> is incorrect.</p>
  
  <pre><code>&lt;int:channel id="myRequestChannel"/&gt;
  &lt;int:channel id="myReplyChannel"/&gt;
  
  &lt;int-http:inbound-gateway id="myGateway"
                            path="/hi"
                            supported-methods="GET"
                            request-channel="myRequestChannel"
                            reply-channel="myReplyChannel"/&gt;
  
  &lt;int:transformer input-channel="myRequestChannel"
                   output-channel="myReplyChannel"
                   expression="'Hello World!'"/&gt;
  </code></pre>
  
  <p>This works when deployed, but when I first call the service I see this logged:</p>
  
  <pre><code>Adding {bridge:null} as a subscriber to the 'myReplyChannel' channel
  Channel 'org.springframework.web.context.WebApplicationContext:myReplyChannel' has 1 subscriber(s).
  started org.springframework.integration.endpoint.EventDrivenConsumer@4eef7503
  </code></pre>
  
  <p>Looks like Spring is adding in a subscriber for <code>myReplyChannel</code> at the last minute. I'd prefer to do it correctly myself.</p>
  
  <p><strong>Unit Test</strong></p>
  
  <p>I wrote a simple unit test to debug this..</p>
  
  <pre><code>@RunWith(SpringJUnit4ClassRunner.class)
  @ContextConfiguration(locations = { "classpath:hello.xml" })
  public class HelloWorldTest {
  
      @Autowired
      private MessageChannel myRequestChannel;
  
      @Test
      public void test() {
          myRequestChannel.send(MessageBuilder.withPayload("").build());
      }
  
  }
  </code></pre>
  
  <p>This errors out with:</p>
  
  <pre><code>org.springframework.messaging.MessageDeliveryException:
    Dispatcher has no subscribers for channel
  'org.springframework.context.support.GenericApplicationContext@64485a47.myReplyChannel'.
  </code></pre>
  
  <p>This reads to me like my configuration is wrong and here Spring isn't holding my hand.</p>
  
  <p><strong>Alternative Configuration:</strong></p>
  
  <p>I've tried just dropping <code>myReplyChannel</code> all together and it worked without anything in the logs.</p>
  
  <pre><code>&lt;int:channel id="myRequestChannel"/&gt;
  
  &lt;int-http:inbound-gateway id="myGateway"
                            path="/ok"
                            supported-methods="GET"
                            request-channel="myRequestChannel"/&gt;
  
  &lt;int:transformer input-channel="myRequestChannel" expression="'OK'"/&gt;
  </code></pre>
  
  <p>Is this the correct setup? If so, what is the <code>reply-channel</code> parameter for?</p>
  
  <p>With this configuration, I get the following error in my unit test:</p>
  
  <pre><code>org.springframework.messaging.MessagingException:
    org.springframework.messaging.core.DestinationResolutionException:
      no output-channel or replyChannel header available
  </code></pre>