# Replace RabbitMQ with KubeMQ (/deploy/scenarios/replace/replace-rabbitmq)



<Callout type="info">
  You need a license key to start KubeMQ — it's free, about 2-3 minutes (it includes creating a free account). 

  [Get one](/deploy/license-key)

  . Step 1 below starts the broker with the connector enabled.
</Callout>

Your RabbitMQ client keeps its library and its code — only the AMQP connection string
changes, from your RabbitMQ host to a local KubeMQ server.

**Drop-in level:** endpoint-only ([legend](/deploy/scenarios/replace#drop-in-levels))

## 1 · Enable the connector [#1--enable-the-connector]

The RabbitMQ (AMQP 0-9-1) connector is disabled by default — enable it and publish its ports:

<RunKubeMQ ports="[5672, 5671, 50000]" env="{ CONNECTORS_AMQP_ENABLE: 'true' }" />

## 2 · Point your client at KubeMQ [#2--point-your-client-at-kubemq]

```text title="AMQP URI swap"
# Before (RabbitMQ)
amqp://user:password@rabbitmq.example.com:5672/

# After (KubeMQ)
amqp://user:password@localhost:5672/
```

Same `pika` (or any AMQP 0-9-1 client library) code — `queue_declare`, `basic_publish`, and
`basic_consume` all work unchanged.

## 3 · Smoke test [#3--smoke-test]

Publish then consume one message with `pika`:

```python title="publish"
import pika

conn = pika.BlockingConnection(pika.URLParameters("amqp://user:pass@localhost:5672/"))
ch = conn.channel()
ch.queue_declare(queue="smoke-test", durable=True)
ch.basic_publish(exchange="", routing_key="smoke-test", body=b"hello-kubemq")
conn.close()
print("published ok")
```

```python title="consume"
import pika

conn = pika.BlockingConnection(pika.URLParameters("amqp://user:pass@localhost:5672/"))
ch = conn.channel()
method, props, body = ch.basic_get(queue="smoke-test", auto_ack=True)
assert body == b"hello-kubemq", f"unexpected body: {body!r}"
conn.close()
print("consume ok:", body)
```

You should see:

```text
published ok
consume ok: b'hello-kubemq'
```

This is the same publish/consume check as [Migrating from RabbitMQ → Verification Smoke
Test](/connectors/rabbitmq/reference/migration-from-rabbitmq#verification-smoke-test).

## What carries over — and what doesn't [#what-carries-over--and-what-doesnt]

Your client library, code, queue and exchange declarations, publisher confirms, and DLX all
carry over unchanged — only the connection string moves. AMQP transactions don't carry over
(use publisher confirms instead), and a handful of declare arguments are accepted but inert —
see the migration guide for the full deviation list.

<Cards>
  <Card title="Getting Started" href="/connectors/rabbitmq/tutorials/getting-started" description="Connect, declare a queue, and send and receive over AMQP 0-9-1 in a few steps." />

  <Card title="Migrating from RabbitMQ" href="/connectors/rabbitmq/reference/migration-from-rabbitmq" description="The complete cutover guide — compatibility matrix, hard rejections, inert arguments, and behavioral deviations." />
</Cards>

## Didn't work? [#didnt-work]

<Callout type="warn">
  * **Wrong port** — confirm `5672` (plain) or `5671` (TLS) is published and matches your
    connection string.
  * **Connector not enabled** — a stock server doesn't bind the AMQP listener until
    `CONNECTORS_AMQP_ENABLE=true` is set.
  * **Auth mismatch** — if authentication is enabled, the SASL PLAIN password must be a valid
    KubeMQ JWT.
</Callout>
