Docker Desktop for Mac

This section walks you through the steps to set up a single PubSub+ software event broker container with Docker in macOS using Docker Compose. If you're interested in setting up event brokers in an HA redundancy group on a macOS platform, take a look at HA Group Configuration for macOS.

Before You Begin

The example shown, which makes use of Solace PubSub+ Standard, is suitable for use with up to 100 client connections and is appropriately configured for testing and PoC activities.

For production purposes, we recommend that you mount the storage-group to an external storage device. This Docker Compose example does not do this. For details about how to externalize the storage-group, refer to Managing Storage for Container Images.

It's assumed that you have:

  • Docker Desktop for Mac (or an equivalent desktop container environment such as Rancher Desktop) installed, with at least 2 GiB of memory dedicated to Docker Desktop for Mac. For more information about allocating memory and swap space, refer to the Docker Settings page.
  • Git installed. The Docker Compose template used in this example, that you can clone or download, is hosted in GitHub at https://github.com/SolaceLabs/solace-single-docker-compose.

Step 1: Download the Docker Compose Template

Clone the GitHub repository containing the Docker Compose template.

git clone https://github.com/SolaceLabs/solace-single-docker-compose.git
cd solace-single-docker-compose/template

Step 2: Create a PubSub+ Software Event Broker

Run the following command to create a PubSub+ software event broker using the Compose template:

docker-compose -f PubSubStandard_singleNode.yml up -d

Using the latest PubSub+ Standard image from Docker Hub (the PubSub+ event broker is published as a multi-architecture image that supports x86_64 and ARM64 for Mac devices with M series processors), the compose template runs an event broker container called pubSubStandardSingleNode, creates an admin user with global access permissions, and publishes the following event broker container ports to the same ports on the macOS host:

  • port 8080—enables SEMP management traffic to the container. Use this port when connecting to the container from Broker Manager (refer to PubSub+ Broker Manager for more information).
  • port 55554—enables SMF data to pass through the container.

On MacOS Big Sur and later, port 55555 (the default SMF port for the software event broker) is blocked. If this port is mapped to a port on a Docker container, the container fails to start, either silently or with a "port in use" error. To avoid this problem, the compose template maps port 55554 on the host to port 55555 in the container.

To use additional services, you can edit the compose template to publish each corresponding port. For example, to enable AMQP over TLS, uncomment the appropriate line in the compose template (- '5671:5671'). For more information about the default ports used for each service, refer to Default Configuration for Software Event Brokers.

Once the container is created, it will take about 60 seconds for the event broker to finish activating.

Step 3: Manage the PubSub+ Software Event Broker

To start issuing configuration or monitoring commands on the event broker, you can access Broker Manager or the Solace CLI

To access PubSub+ Broker Manager:

  1. Open a browser and enter http://localhost:8080.
  2. Log in as user admin with password admin.

To access the Solace CLI:

  1. Enter the following docker exec command:

    >sudo docker exec -it <container_name> /usr/sw/loads/currentload/bin/cli -A
  2. Type the following commands to enter configuration mode:

    solace> enable
    solace# config
    solace(configure)#

    For a list of Solace CLI commands currently supported on the event broker, refer to Software Event Broker CLI Commands.

Next Steps

You now have a software event broker container with a basic configuration that is ready for messaging tasks.

There are additional configuration tasks that you can make use of in the following topics:

When you are comfortable with your event broker, you can test messaging using the Solace SDKPerf application. You can download SDKPerf from the Other Software section in the Downloads page.

For more information about working with your event brokers, see the following: