2

Our DevOps team has specific naming requirements for queues in rabbit, I have done some searching and came across the below, which I thought may have worked, however it only names the one default queue and it puts the name before .pidbox. all the queues here need to be prefixed with a name if possible?

# set app name
app_name = 'my_app'
# Optional configuration, see the application user guide.
app.conf.update(
    result_expires=3600,
    control_exchange=app_name,
    event_exchange=app_name + '.ev',
    task_default_queue=app_name,
    task_default_exchange=app_name,
    task_default_routing_key=app_name,
)

sample queues with the above config

bash-5.0# rabbitmqctl list_queues
Timeout: 60.0 seconds ...
Listing queues for vhost / ...
name    messages
my_app  0
celery@6989aa04c815.my_app.pidbox   0
celeryev.c1ce1b85-1bdc-4a46-b15b-e6b85105acdd   0
celeryev.8ba23a8f-9034-4c9b-8d86-56bfb368fdb6   0
bash-5.0#

desired queue names

bash-5.0# rabbitmqctl list_queues
Timeout: 60.0 seconds ...
Listing queues for vhost / ...
name    messages
my_app  0
my_app.celery@6989aa04c815.pidbox   0
my_app.celeryev.c1ce1b85-1bdc-4a46-b15b-e6b85105acdd    0
my_app.celeryev.8ba23a8f-9034-4c9b-8d86-56bfb368fdb6    0
bash-5.0#

is this possible to achieve? I know I can disable the pidbox queue in the options CELERY_ENABLE_REMOTE_CONTROL = False, but I use flower to monitor the queues so I need this option?

Thanks

AlexW
  • 2,843
  • 12
  • 74
  • 156
  • I do not think it is possible to rename those queues that are used internally by Celery, but do not take my words for granted. I am not 100% sure. – DejanLekic Jul 20 '20 at 12:11

0 Answers0