1. Installing RabbitMQ broker using Docker

RabbitMQ is a message broker that can be used with the AMQP functions in the ACF Plugin. This article shows a small Docker setup that starts RabbitMQ with the management web interface enabled, creates a development user, and predefines a couple of queues and exchanges that are useful for testing.

This setup is intended for development and tutorials. For production, use stronger passwords, firewall rules, backups, and a deliberate RabbitMQ security configuration.

  1. Installing RabbitMQ broker using Docker
    1. What this setup provides
    2. Install Docker Desktop on Mac
    3. Create a project folder
    4. Dockerfile
    5. docker-compose.yml
    6. enabled_plugins
    7. rabbitmq.conf
    8. definitions.json
    9. Start RabbitMQ
    10. Open the management web interface
    11. Test from the command line
    12. Stop RabbitMQ
    13. If login fails
    14. Use from FileMaker
    15. Production notes

1.1. What this setup provides

The Docker setup exposes:

Service Address
AMQP broker localhost:5672
RabbitMQ management web UI https://localhost:15672
User acf
Password acf_dev_password
Virtual host /

It also creates two direct exchanges and queues:

Queue/exchange Purpose
celery Matches the historical default used by the ACF AMQP send function.
acf-test A simple extra queue for command-line publishing tests.

1.2. Install Docker Desktop on Mac

If Docker is not installed, install Docker Desktop before continuing.

The official Docker installation page for Mac is:

https://docs.docker.com/desktop/setup/install/mac-install/

Docker provides separate downloads for Apple silicon and Intel Macs. The official documentation also lists the current macOS requirements and installation steps, so use that page as the final reference if anything has changed.

For a normal interactive installation:

  1. Download Docker Desktop for your Mac type from the official Docker page.
  2. Open Docker.dmg.
  3. Drag Docker to the Applications folder.
  4. Start Docker.app from Applications.
  5. Accept the Docker Desktop terms.
  6. Use the recommended settings unless you have a reason to customize the installation.
  7. Wait until Docker Desktop reports that Docker is running.

Docker Desktop requires a supported macOS version and at least 4 GB RAM. Docker's current policy is to support the current and two previous major macOS releases.

After installation, open Terminal and verify Docker:

docker --version
docker compose version

If the docker compose command works, continue with the RabbitMQ setup below.

Note about licensing: Docker Desktop is free for personal use, education, non-commercial open source projects, and small businesses. Larger commercial organizations may need a paid Docker subscription. Check Docker's own terms for the current details.

1.3. Create a project folder

NOTE: We have made a download for this setup containing the files described below. Head over to the Downloads page, and scroll down to the bottom section under "Other tools"

Create a folder for the RabbitMQ Docker setup:

mkdir acf-rabbitmq-docker
cd acf-rabbitmq-docker
mkdir -p shared

The shared folder is mounted into the container as /shared. It is useful for exporting RabbitMQ definitions or sharing temporary test files with the container.

1.4. Dockerfile

Create a file named Dockerfile:

FROM rabbitmq:3.13-management

COPY enabled_plugins /etc/rabbitmq/enabled_plugins
COPY rabbitmq.conf /etc/rabbitmq/rabbitmq.conf
COPY definitions.json /etc/rabbitmq/definitions.json

The base image already includes RabbitMQ and the management plugin package. The files copied into /etc/rabbitmq/ configure the broker when the container starts.

1.5. docker-compose.yml

Create a file named docker-compose.yml:

services:
  rabbitmq:
    build:
      context: .
    container_name: acf-rabbitmq
    hostname: acf-rabbitmq
    environment:
      RABBITMQ_DEFAULT_USER: acf
      RABBITMQ_DEFAULT_PASS: acf_dev_password
      RABBITMQ_DEFAULT_VHOST: /
    ports:
      - "5672:5672"
      - "15672:15672"
    volumes:
      - rabbitmq-data:/var/lib/rabbitmq
      - ./shared:/shared
    healthcheck:
      test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
      interval: 10s
      timeout: 5s
      retries: 12
    restart: unless-stopped

volumes:
  rabbitmq-data:

The important ports are:

1.6. enabled_plugins

Create a file named enabled_plugins:

[rabbitmq_management].

This enables the RabbitMQ management web interface.

1.7. rabbitmq.conf

Create a file named rabbitmq.conf:

default_user = acf
default_pass = acf_dev_password
default_vhost = /

listeners.tcp.default = 5672
management.tcp.port = 15672
management.load_definitions = /etc/rabbitmq/definitions.json

This defines the development user, the AMQP port, the management UI port, and the file containing the initial queue/exchange definitions.

1.8. definitions.json

Create a file named definitions.json:

{
  "vhosts": [
    {
      "name": "/"
    }
  ],
  "permissions": [],
  "topic_permissions": [],
  "parameters": [],
  "global_parameters": [],
  "policies": [],
  "queues": [
    {
      "name": "celery",
      "vhost": "/",
      "durable": true,
      "auto_delete": false,
      "arguments": {}
    },
    {
      "name": "acf-test",
      "vhost": "/",
      "durable": true,
      "auto_delete": false,
      "arguments": {}
    }
  ],
  "exchanges": [
    {
      "name": "celery",
      "vhost": "/",
      "type": "direct",
      "durable": true,
      "auto_delete": false,
      "internal": false,
      "arguments": {}
    },
    {
      "name": "acf-test",
      "vhost": "/",
      "type": "direct",
      "durable": true,
      "auto_delete": false,
      "internal": false,
      "arguments": {}
    }
  ],
  "bindings": [
    {
      "source": "celery",
      "vhost": "/",
      "destination": "celery",
      "destination_type": "queue",
      "routing_key": "celery",
      "arguments": {}
    },
    {
      "source": "acf-test",
      "vhost": "/",
      "destination": "acf-test",
      "destination_type": "queue",
      "routing_key": "acf-test",
      "arguments": {}
    }
  ]
}

This creates a simple direct exchange setup:

1.9. Start RabbitMQ

Build and start the container:

docker compose up -d --build

If your Docker installation uses the older command name:

docker-compose up -d --build

Check that the container is running:

docker ps

You should see a container named:

acf-rabbitmq

1.10. Open the management web interface

Open this URL in your browser:

https://localhost:15672

Login:

User: acf
Password: acf_dev_password

From here you can inspect queues, exchanges, bindings, connections, channels, publish rates, consume rates, and message counts.

RabbitMQ-overview

RabbitMQ-Queues

1.11. Test from the command line

List queues:

docker exec acf-rabbitmq rabbitmqctl list_queues name messages consumers

List exchanges:

docker exec acf-rabbitmq rabbitmqctl list_exchanges name type durable

Publish a test message:

docker exec acf-rabbitmq rabbitmqadmin publish \
  --username=acf --password=acf_dev_password --vhost=/ \
  exchange=acf-test routing_key=acf-test \
  payload='{"id":"manual","task":"acf.test","args":["hello"]}'

Get one message from the acf-test queue:

docker exec acf-rabbitmq rabbitmqadmin \
  --username=acf --password=acf_dev_password --vhost=/ \
  get queue=acf-test requeue=false

1.12. Stop RabbitMQ

Stop the container:

docker compose down

Stop the container and remove the RabbitMQ data volume:

docker compose down -v

Use docker compose down -v only for development resets. It deletes the RabbitMQ broker data, including queued messages.

1.13. If login fails

RabbitMQ creates the default user only when the broker database is initialized. If you previously started the same Docker volume with different credentials, RabbitMQ may keep the old user database.

For a clean development reset:

docker compose down -v
docker compose up -d --build

Alternatively, repair the running container without deleting messages:

docker exec acf-rabbitmq rabbitmqctl add_user acf acf_dev_password
docker exec acf-rabbitmq rabbitmqctl set_user_tags acf administrator
docker exec acf-rabbitmq rabbitmqctl set_permissions -p / acf ".*" ".*" ".*"

If the user already exists, the add_user command will report that. In that case, you can change the password:

docker exec acf-rabbitmq rabbitmqctl change_password acf acf_dev_password

1.14. Use from FileMaker

After the broker is running, FileMaker can connect through the ACF Plugin:

Set Variable [ $$AMQP ; ACF_AMQP_Initialize ( "127.0.0.1" ; "acf" ; "acf_dev_password" ; "5672" ) ]

Send a message:

Set Variable [ $payload ; "client1¶Order¶12345¶manual test" ]
Set Variable [ $res ; ACF_AMQP_Send ( "acf.test.echo" ; $payload ; "celery" ; "celery" ; 1 ; 1 ) ]

Listen for one message:

Set Variable [ $message ; ACF_AMQP_Listen ( "celery" ; 1 ; "" ; 5 ) ]

For a full FileMaker tutorial, see Setting up AMQP with RabbitMQ and the ACF Plugin.

1.15. Production notes

This Docker configuration is intentionally simple.

Before using RabbitMQ in production:

For development, this Docker setup is a quick way to get a real AMQP broker running and start testing FileMaker, PHP, Python, web-shop, and command-line producers and consumers.