title: rabbitmq amqp - listening to ack messages from consumer
body: <p>I have a producer and broker on the same machine. The producer sends messages like so:</p>
  
  <pre><code>channel = connection.createChannel();
  
  //Create a durable queue (if not already present)
  channel.queueDeclare(merchantId, true, false, false, null);
  
  //Publish message onto the queue
  channel.basicPublish("", consumerId, true, false,
      MessageProperties.MINIMAL_PERSISTENT_BASIC, "myMessage");
  </code></pre>
  
  <p>The consumer sits on another machine and listens to messages. It uses explicit acknowledgement like so:</p>
  
  <pre><code>while (true) {
      QueueingConsumer.Delivery delivery = consumer.nextDelivery();
      //Handle message here  
      channel.basicAck(delivery.getEnvelope().getDeliveryTag(), false);
  }   
  </code></pre>
  
  <p>From what I understand, the ack is meant for the broker to dequeue the message.</p>
  
  <p>But how can my producer come to know about the ack that the consumer sent? </p>