title: How does RabbitMQ publisher confirms work?
body: <p>I have gone through rabbitmq documentation, 
  <a href="https://www.rabbitmq.com/confirms.html#publisher-confirms" rel="nofollow noreferrer">https://www.rabbitmq.com/confirms.html#publisher-confirms</a></p>
  
  <blockquote>
    <p>Using standard AMQP 0-9-1, the only way to guarantee that a message
    isn't lost is by using transactions -- make the channel transactional
    then for each message or set of messages publish, commit. <strong>In this
    case, transactions are unnecessarily heavyweight and decrease
    throughput by a factor of 250. To remedy this, a confirmation
    mechanism was introduced. It mimics the consumer acknowledgements
    mechanism already present in the protocol</strong>.</p>
    
    <p>To enable confirms, a client sends the confirm.select method.
    Depending on whether no-wait was set or not, the broker may respond
    with a confirm.select-ok. Once the confirm.select method is used on a
    channel, it is said to be in confirm mode. A transactional channel
    cannot be put into confirm mode and once a channel is in confirm mode,
    it cannot be made transactional.</p>
  </blockquote>
  
  <p>Currently I am using RabbitTemplate.convertAndSend of spring-rabbit library to send message.
  I am using transactional channel to publish messages to rabbitmq, As per the document its slower and I can can improve the throughput by using publisher-confirm. </p>
  
  <p>But I am not much clear about it.  </p>
  
  <p>If I want to enable confirm then what are changes required and how do I handle exception?
  What will be my retrial mechanism?
  Does this publisher confirm work in asynchronous way? 
  And does transaction work in synchronously?</p>
  
  <p>Any suggestion is highly appreciated.</p>