瀏覽代碼

[CRITICAL when RabbitMQ >= 1.8.0] Fixes equivalence checks for broadcast repleis

Ask Solem 15 年之前
父節點
當前提交
305e168461
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      celery/messaging.py

+ 3 - 1
celery/messaging.py

@@ -172,6 +172,8 @@ class ControlReplyPublisher(Publisher):
     exchange = "celerycrq"
     exchange_type = "direct"
     delivery_mode = "non-persistent"
+    durable = False
+    auto_delete = True
 
 
 class BroadcastPublisher(Publisher):
@@ -268,6 +270,6 @@ def get_consumer_set(connection, queues=None, **options):
 @with_connection
 def reply(data, exchange, routing_key, connection=None, connect_timeout=None,
         **kwargs):
-    pub = Publisher(connection, exchange=exchange,
+    pub = ControlReplyPublisher(connection, exchange=exchange,
                     routing_key=routing_key, **kwargs)
     pub.send(data)