Browse Source

Merge branch 'master' of github.com:celery/celery

Ask Solem 8 years ago
parent
commit
ac6da7bee9
2 changed files with 18 additions and 0 deletions
  1. 1 0
      CONTRIBUTORS.txt
  2. 17 0
      docs/userguide/routing.rst

+ 1 - 0
CONTRIBUTORS.txt

@@ -219,3 +219,4 @@ Kevin Richardson, 2016/06/29
 Andrew Stewart, 2016/07/04
 Andrew Stewart, 2016/07/04
 Xin Li, 2016/08/03
 Xin Li, 2016/08/03
 Alli Witheford, 2016/09/29
 Alli Witheford, 2016/09/29
+Marat Sharafutdinov, 2016/11/04

+ 17 - 0
docs/userguide/routing.rst

@@ -549,6 +549,23 @@ The default exchange, exchange type, and routing key will be used as the
 default routing values for tasks, and as the default values for entries
 default routing values for tasks, and as the default values for entries
 in :setting:`task_queues`.
 in :setting:`task_queues`.
 
 
+Multiple bindings to a single queue are also supported.  Here's an example
+of two routing keys that are both bound to the same queue:
+
+.. code-block:: python
+
+    from kombu import Exchange, Queue, binding
+
+    media_exchange = Exchange('media', type='direct')
+
+    CELERY_QUEUES = (
+        Queue('media', [
+            binding(media_exchange, routing_key='media.video'),
+            binding(media_exchange, routing_key='media.image'),
+        ]),
+    )
+
+
 .. _routing-task-destination:
 .. _routing-task-destination:
 
 
 Specifying task destination
 Specifying task destination