---
title: Deploy RabbitMQ with AI on Blossom
url: "/deploy/rabbitmq/"
canonical_url: https://blossom88.com/deploy/rabbitmq/
markdown_url: https://blossom88.com/deploy/rabbitmq.md
summary: Run a private RabbitMQ broker and recover an unacknowledged message after
  a Container update.
categories:
- deployment
- databases
stack:
- Erlang
- AMQP
---

# Deploy RabbitMQ with AI on Blossom

[RabbitMQ](https://www.rabbitmq.com/) is a message broker. Applications
publish work to a queue and workers receive and acknowledge it.

## Ask Your Agent

> **Ask your AI agent:** Deploy RabbitMQ on Blossom and help me publish and consume a test message.
>
> Follow this guide: https://blossom88.com/deploy/rabbitmq/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and [choose a Location in your cloud account](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#connect-your-provider).

## How It Runs

| Part | Role | Where |
|---|---|---|
| RabbitMQ | Store and deliver messages | Private Persistent Service |
| AMQP client | Publish, receive, and acknowledge sample messages | Blossom Job |

## Deploy RabbitMQ

Use the [official RabbitMQ image](https://hub.docker.com/_/rabbitmq).
Keep the broker private and create a named user and password. Use a
[Persistent Service Volume](/docs/apps/persistent-services/) for
message storage.

<details class="optional-reading" markdown="1">
<summary>Notes for your agent</summary>

Mount the Volume at `/var/lib/rabbitmq` and keep the broker's node name
stable across replacements. Set the initial user, password and virtual
host through Blossom Variables and Links. Connect to the private AMQP
port `5672`.

    blossom environment:deploy --id environment-100 --follow

</details>

## Publish Two Messages

Declare a durable queue. Publish two persistent messages with
[publisher confirms](https://www.rabbitmq.com/docs/confirms), then
receive both and acknowledge only the first one.

> **Ask your AI agent:** Help me publish two persistent messages, receive both, and acknowledge only the first.

> Follow this guide: https://blossom88.com/deploy/rabbitmq/



![Confirm two messages and acknowledge the first.](/deploy/assets/images/rabbitmq/publish-two-messages.webp)

## Recover the Unacknowledged Message

Replace the broker Container on the same Volume. Read and
acknowledge the remaining message, then check the queue is empty.

> **Ask your AI agent:** Replace RabbitMQ and confirm the remaining message can still be read and acknowledged.

> Follow this guide: https://blossom88.com/deploy/rabbitmq/



![Recover and acknowledge the follow-up after the update.](/deploy/assets/images/rabbitmq/ack-after-replacement.webp)

## What You Get

A private broker with a durable queue and a first publish-and-consume
workflow that survives a Container update.

## What You Get

- A private RabbitMQ broker and durable queue
- Two persistent messages confirmed by the broker
- The remaining message after replacing the Container

Tested on Blossom: The acknowledged message stayed gone and RabbitMQ delivered the follow-up after replacing the broker Container.
