gjedeer / celery-php

PHP client for Celery
http://massivescale.net/celery-php/
Other
422 stars 120 forks source link

Is it possible to use the same Celery object for different queues #111

Closed lexabug closed 6 years ago

lexabug commented 6 years ago

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.

gjedeer commented 6 years ago

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.