'Pass a callback function that will be called when basic_publish as
sent a message that has been rejected and returned by the server.
:param callable callback: The function to call, having the signature
callback(channel, method, properties, body)
where
channel: pika.Channel
method: pika.spec.Basic.Return
properties: pika.spec.BasicProperties
body: str, unicode, or bytes (python 3.x)'

def add_on_return_callback(self, callback):

    self.callbacks.add(self.channel_number, '_on_return', callback, False)
