I am trying to create a celery app using reverse topic exchange rabbitmq plugin from Alvaro Videla. The workers seems to connect with the broker fine using this exchange but when I topic-reverse-route my task, do not pick up the '#' or '*', works like direct exchange.
so thats my queue:
Queue(name='cluster',
exchange = Exchange(name='cluster',
type='x-rtopic',
delivery_mode='persistent',
durable=True),
routing_key='intel.%d.%s' % (n_cores, hostname),
durable = True,)
Now picture 2 workers using the following routing_key
- Worker1 : intel.8.host1
- Worker2 : amd.2.host2
Thats the routing_keys on the tasks I am trying and what I experienced:
Routing key | Works? | Result | Expected
-------------------------------------------------------------------------
'intel' | OK | Nobody receives |
'intel.*' | OK | Nobody receives |
'intel.#' | WRONG | Everyone receives | just Worker1 receives
'#.host1' | WRONG | Everyone receives | just Worker1 receives
'intel.*.* | WRONG | Everyone receives | just Worker1 receives
'intel.*.host1 | WRONG | Everyone receives | just Worker1 receives
'*.2.*' | WRONG | Everyone receives | just Worker2 receives
'intel.8.host1' | OK | like direct exchange |
To try identify where was the problem, I've tested the plugin doing simple messaging using pika and just kombu as well and both worked fine, exactly as expected. So I figured must be a problem with the way Celery is exchanging (routing) the messages. Maybe I should create a custom routing class!?
Thanks in advance.