Looks like Celery's constructor "binds" an object to queue and exchange names that are passed to it. The only way to control which queue task would land is to specify a routing key when PostTask called. But in that case, an exchange would be the same (and as I see this implementation declare all exchanges as direct, while rabbitmq supports more than that one).
Is it possible to post tasks to queues and exchanges that are not specified with Celery's constructor arguments? So I can use one connection to reach different queues and exchanges.
No, you're supposed to use different objects for that, it's by design. The objects are lightweight and don't create any connections upon construction so the only cost is several hundred bytes of memory.
Looks like
Celery
's constructor "binds" an object to queue and exchange names that are passed to it. The only way to control which queue task would land is to specify a routing key whenPostTask
called. But in that case, an exchange would be the same (and as I see this implementation declare all exchanges asdirect
, while rabbitmq supports more than that one).Is it possible to post tasks to queues and exchanges that are not specified with
Celery
's constructor arguments? So I can use one connection to reach different queues and exchanges.