how to set spring amqp publisher confirms and returns?
<p>I am a newer to spring amqp.
When config spring amqp publisher Confirms and returns , met problems .</p>

<p>amqp config :</p>

<pre><code>SimpleMessageListenerContainer container(CachingConnectionFactory connectionFactory, @Qualifier("topicListenerAdapter")MessageListenerAdapter listenerAdapter) {

    connectionFactory.setChannelCacheSize(5);
    connectionFactory.setPublisherConfirms(true);
    connectionFactory.setPublisherReturns(true);
    SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
    container.setConnectionFactory(connectionFactory);
    container.setQueueNames("request.queue","reply.queue");
    container.setMessageConverter(json2MessageConverter());
    container.setReceiveTimeout(3000);
    container.setMessageListener(listenerAdapter);

    return container;
}
</code></pre>

<p>send message:</p>

<pre><code>rabbitTemplate.convertAndSend("spring-boots5", message);
        rabbitTemplate.setConfirmCallback(new ConfirmCallback(){

            @Override
            public void confirm(CorrelationData correlationData, boolean ack, String cause) {
                // TODO Auto-generated method stub

                System.out.println("confirm correlationData is : "+correlationData+"ack is : "+
                ack);
            }

        });
        rabbitTemplate.setMandatory(true);
</code></pre>

<p>When running this application , amqp message received :  </p>

<pre><code>Body:'This is my first message'MessageProperties [headers={bar=baz}, timestamp=null, messageId=123456, userId=null, appId=null, clusterId=null, type=null, correlationId=null, replyTo=null, contentType=text/plain, contentEncoding=null, contentLength=0, deliveryMode=PERSISTENT, expiration=null, priority=0, redelivered=false, receivedExchange=, receivedRoutingKey=request.queue, deliveryTag=1, messageCount=0]) &gt;
</code></pre>

<p>met en error :</p>

<pre><code>22 20:48:08.661[0;39m [31mERROR[0;39m [35m37792[0;39m [2m---[0;39m [2m[ 127.0.0.1:5672][0;39m [36mo.s.a.r.s.PublisherCallbackChannelImpl  [0;39m [2m:[0;39m No listener for seq:1
</code></pre>

<blockquote>
  <p>And no expecting string on console :</p>
  
  <p><strong>"confirm correlationData is : "+correlationData+"ack is : "+
                ack</strong></p>
  
  <p>And not know how to config Reply Messaging (i use java config)</p>
</blockquote>