Restarting RabbitMQ on OS X

DevOps, OS X

Restarting RabbitMQ on OS X

This post is as much a ‘note to self’ as anything, but will hopefully help others too.

Lots of our projects use RabbitMQ as a queueing mechanism, and since we all use Max OS X there are occasionally times when we need to restart the Rabbit MQ service – particularly on Mojave it seems to ‘go to sleep’ periodically! These instructions assume that RabbitMQ has been installed using brew, which will almost certainly apply to everyone else running Rabbit on OS X.

To stop the existing service
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.rabbitmq.plist

To start the service again
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.rabbitmq.plist

You can also use the brew service manager to achieve the same result

brew services stop rabbitmq
brew services start rabbitmq

Thanks to Mike Holdsworth who added the above as a helpful reply to the StackOverflow question How do I stop the RabbitMQ server on localhost. I’m reposting it here because whenever I need these commands I can’t seem to find that answer easily!

Leave A Comment

*
*