def on_basic_return(self, _channel, method, properties, body):
        """Invoke a registered callback or log the returned message.

        :param _channel: The channel the message was sent on
        :type _channel: pika.channel.Channel
        :param pika.spec.Basic.Return method: The method object
        :param pika.spec.BasicProperties properties: The message properties
        :param str, unicode, bytes body: The message body

        """
        if self.on_return:
            self.on_return(method, properties, body)
        else:
            LOGGER.critical(
                '%s message %s published to %s (CID %s) returned: %s',
                method.exchange, properties.message_id,
                method.routing_key, properties.correlation_id,
                method.reply_text)
def on_basic_return ( self , _channel , method , properties , body ) : if self . on_return : self . on_return ( method , properties , body ) else : LOGGER . critical ( '%s message %s published to %s (CID %s) returned: %s' , method . exchange , properties . message_id , method . routing_key , properties . correlation_id , method . reply_text )
Invoke a registered callback or log the returned message.

        :param _channel: The channel the message was sent on
        :type _channel: pika.channel.Channel
        :param pika.spec.Basic.Return method: The method object
        :param pika.spec.BasicProperties properties: The message properties
        :param str, unicode, bytes body: The message body