def _on_message(self, channel, method_frame, header_frame, body):
        self._processing = True
        self.logger.debug("[AMQP-RECEIVE] #%s: %s" %
                          (method_frame.delivery_tag, body))
        try:
            message = IncomingMessage(body)
            headers = vars(header_frame)
            headers.update(vars(method_frame))
            task = AmqpTask(message, headers=headers)
            if not method_frame.redelivered:
                self._responses.append(method_frame.delivery_tag)
                self.tq.put(task)
            else:
                raise ValueError("Message redelivered. Won't process.")
        except __HOLE__ as err:
            self.acknowledge_message(method_frame.delivery_tag)
            self._processing = False
            self.logger.warning(err)

    ##########################
    # Publishing
    ##########################
dataset/ETHPy150Open comodit/synapse-agent/synapse/amqp.py/AmqpSynapse._on_message