Look at the following screenshot
My queue has a binding with an exchange named foo
only receiving messages with Routing key bar
. I have also defined a pair of arguments {baz: qux}
. Now I have a following code:
credentials = pika.PlainCredentials(...)
parameters = pika.ConnectionParameters(...)
connection = pika.BlockingConnection(parameters)
channel = connection.channel()
channel.basic_qos(prefetch_count=1)
channel.basic_consume(callback, queue='this_queue')
And the callback has the following signature:
def callback(channel, method, properties, body):
....
Now the question: how do I access arguments ({baz: qux}
) inside the callback. Is this possible at all?