【发布时间】:2013-11-23 14:36:02
【问题描述】:
我正在使用 rabbitmctl 和 pika 库。 我使用下面的代码来创建一个Producer
#!/usr/bin/env python
import pika
import time
import json
import datetime
connection = pika.BlockingConnection(pika.ConnectionParameters(
host='localhost'))
channel = connection.channel()
channel.queue_declare(queue='hello')
def callback(ch, method, properties, body):
#print " current time: %s " % (str(int((time.time())*1000)))
print body
channel.basic_consume(callback,
queue='hello',
no_ack=True)
channel.start_consuming()
由于我每次都创建一个现有队列(如果未创建队列,则覆盖队列的创建)队列已因此而损坏。现在我想删除队列..我该怎么做?
【问题讨论】: