Created
November 6, 2012 16:47
-
-
Save pilate/4025942 to your computer and use it in GitHub Desktop.
Get all queue elements from RabbitMQ with pika
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pika | |
def callback(ch, method, properties, body): | |
pass | |
connection = pika.BlockingConnection(pika.ConnectionParameters('localhost')) | |
channel = connection.channel() | |
channel.queue_declare(queue='queue', passive=True) | |
channel.basic_consume(callback, queue='queue', no_ack=False) | |
connection.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment