Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Cyrille37's avatar

restart AMQ listeners after fresh code deployed

Hello. Is some one has AMQ listeners (RabbitMQ, ActiveMQ, ...) ?

I looking for a way to restart listeners when fresh code is deployed, like a queue:restart but for amq listeners.

What's your method for that ?

Thanks for share and idea ;-)

0 likes
3 replies
D9705996's avatar

You could add your restart command to the post install section of composer

"post-install-cmd": [
   "service rabbitmq-server restart"
 ],

Obviously replace to your needs

Cyrille37's avatar

Thanks @D9705996

But I would like something like Laravel Queues:

  • supervisord is managing artisan queue:work
  • artisan queue:restart tell queue worker to stop
  • supervisord restart artisan queue:work
  • fresh deployed code is on board

To follow you idea I'll have a look on how to tell supervisord to restart a sub-process.

Cheers

Cyrille37's avatar
Cyrille37
OP
Best Answer
Level 1

Ok, I've found the way to ask supervisord to restart a specific process (the MQ listener in my case).

Please or to participate in this conversation.