'Turn on Confirm mode in the channel. Pass in a callback to be
notified by the Broker when a message has been confirmed as received or
rejected (Basic.Ack, Basic.Nack) from the broker to the publisher.
For more information see:
http://www.rabbitmq.com/extensions.html#confirms
:param callable callback: The callback for delivery confirmations that
has the following signature: callback(pika.frame.Method), where
method_frame contains either method `spec.Basic.Ack` or
`spec.Basic.Nack`.
:param bool nowait: Do not send a reply frame (Confirm.SelectOk)'

def confirm_delivery(self, callback=None, nowait=False):

    self._validate_channel_and_callback(callback)
    if (not (self.connection.publisher_confirms and self.connection.basic_nack)):
        raise exceptions.MethodNotImplemented('Not    Supported    on    Server')
    if (callback is not None):
        self.callbacks.add(self.channel_number, spec.Basic.Ack, callback, False)
        self.callbacks.add(self.channel_number, spec.Basic.Nack, callback, False)
    self._rpc(spec.Confirm.Select(nowait), (self._on_selectok if (not nowait) else None), ([spec.Confirm.SelectOk] if (nowait is False) else []))
