'Acknowledge this message as being processed.
This will remove the message from the queue.
Raises:
MessageStateError: If the message has already been
acknowledged/requeued/rejected.'

def ack(self, multiple=False):

    if (self.channel is None):
        raise self.MessageStateError(u'This    message    does    not    have    a    receiving    channel')
    if (self.channel.no_ack_consumers is not None):
        try:
            consumer_tag = self.delivery_info[u'consumer_tag']
        except KeyError:
            pass
        else:
            if (consumer_tag in self.channel.no_ack_consumers):
                return
    if self.acknowledged:
        raise self.MessageStateError(u'Message    already    acknowledged    with    state:    {0._state}'.format(self))
    self.channel.basic_ack(self.delivery_tag, multiple=multiple)
    self._state = u'ACK'
