python - Retrieving AMQP routing key information using pika -



python - Retrieving AMQP routing key information using pika -

new rabbitmq , trying determine way in retrieve routing key info of amqp message. has tried before? not finding lot of documentation explicitly states how query amqp using pika (python).

this trying do:

basically have consumer class, example:

channel.exchange_declare(exchange='test', type='topic') channel.queue_declare(queue='topic_queue',auto_delete=true) channel.queue_bind(queue='topic_queue', exchange='test', routing_key = '#')

i set queue , bind exchange , routing_keys (or binding keys suppose) beingness passed through exchange.

i have function:

def amqmessage(ch, method, properties, body): channel.basic_consume(amqmessage, queue=queue_name, no_ack=true) channel.start_consuming()

i think routing_key should "method.routing_key" amqmessage function not how work correctly.

python amqp pika

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -