Launching the RabbitMQ broker

With the RabbitMQ broker installed, we just need to launch it. There are these two approaches to doing that:

  • Starting it in our current shell
  • Having it start when the machine boots

To start in our current shell, we can execute the following command:

$ rabbitmq-server
    
RabbitMQ 3.6.4. Copyright (C) 2007-2016 Pivotal Software...
##  ##      Licensed under the MPL.  See http://www.rabbitmq.com/
##  ##
##########  Logs: /usr/local/var/log/rabbitmq/rabbit@localhost.log
######  ##        /usr/local/var/log/rabbitmq/rabbit@localhost-sasl....
##########
Starting broker...
completed with 10 plugins.  

On a macOS with Homebrew, use the following to launch as a daemon process and relaunch when we reboot:

$ brew services start rabbitmq

Get Learning Spring Boot 2.0 - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.