title: How to manage manual ack with Spring Cloud Stream Rabbit?
body: <p>I tried several ways to manage manual ack with RabbitMQ, especially based on <a href="https://stackoverflow.com/questions/39048279/manual-ack-with-spring-cloud-stream-rabbitmq">this previous post</a>, but unfortunately, none of them works.</p>
  
  <p>In my configuration file, I have set the acknowledge-mode to MANUAL as follow: </p>
  
  <pre><code>spring:
    cloud:
      stream:
        bindings:
          magento-consumer:
            binder: rabbit
            destination: toto
            durableSubscription: false
            consumer:
              acknowledge-mode: MANUAL
  </code></pre>
  
  <p>Then, I have a <code>receive</code> method which is annotate by <code>@StreamListener</code>, which takes 4 parameters: </p>
  
  <pre class="lang-java prettyprint-override"><code>    @StreamListener(SinkInterface.NAME)
      public void receive(
              Message&lt;Event&gt; m,
              @Header(name = Queue.TO_MAGENTO , required = false) Boolean header,
              @Header(AmqpHeaders.CHANNEL) Channel channel,
              @Header(AmqpHeaders.DELIVERY_TAG) Long deliveryTag
      ) {
  
          //Do something
  
      }
  </code></pre>
  
  <p>The issue is that the <code>channel</code> parameter is always null, so I cannot retrieve the <code>amqp_channel</code> header.</p>
  
  <blockquote>
    <p>org.springframework.messaging.MessageHandlingException: Missing header 'amqp_channel' for method parameter type [interface com.rabbitmq.client.Channel]</p>
  </blockquote>
  
  <p>How can I retrieve this channel parameter ?
  I don't understand why the <code>amqp_channel</code> is not set, and how to inject it. </p>
  
  <p>Did I miss something ?</p>