Created
November 6, 2012 17:04
-
-
Save pilate/4026050 to your computer and use it in GitHub Desktop.
Empty existing RabbitMQ Queue
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, json | |
# Clear the RMQ | |
def callback(ch, method, properties, body): | |
pass | |
connection = pika.BlockingConnection(pika.ConnectionParameters('localhost')) | |
channel = connection.channel() | |
channel.queue_declare(queue='Phantom') | |
channel.basic_consume(callback, queue='Phantom', no_ack=True) | |
connection.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment