Keploy as a RabbitMQ testing framework
Keploy tests RabbitMQ publishers and consumers by recording the AMQP protocol beneath your client, capturing publish confirms, deliveries, and acknowledgements, then replaying them during tests. No broker runs in CI and no queue or exchange has to be declared.
keploy record -c "./orders-service"What Keploy gives a RabbitMQ team
Captured at the AMQP 0-9-1 protocol
Keploy reads the protocol beneath your client, recording publishes with the broker's confirm, deliveries with their routing keys and headers, and the acks or nacks your consumer sent back.
- Below amqplib, pika, Bunny, and the Java client
- Publisher confirms captured
- Routing keys and headers preserved
- Ack and nack ordering kept
Why RabbitMQ integration tests slow teams down
The friction is rarely the assertions. It is everything around them — spinning up dependencies, keeping mocks honest, and repairing tests after every refactor.
Testing RabbitMQ: by hand, with Testcontainers RabbitMQ, or with Keploy
A real broker gives true routing semantics and makes every consumer test wait on asynchronous delivery. Keploy records the exchanges once and replays them deterministically.
Select any row for the full comparison, with code.
What you write for RabbitMQ vs what Keploy records
All three produce the same assertion. Only the third still passes after the next refactor without anyone editing it.
This asserts a method was called. A wrong routing key or an unbound exchange would pass here and silently drop the message in production.
Real routing and confirms, at the cost of a broker per suite and a ten-second poll window that turns CI load into test failures.
The routing key, message properties, and the broker's confirm are all recorded, so a topology or serialiser mistake surfaces as a diff with no polling.
Times are estimates for authoring one endpoint’s coverage from scratch, not measurements.
RabbitMQ testing tools, compared
The options a team on message brokers actually reaches for, and where each one genuinely wins. Select a row for the full comparison.
Assessments reflect each tool’s documented behaviour, not benchmark measurements.
Record your RabbitMQ app once, replay it forever
Keploy sits below your RabbitMQ process at the network layer. It watches the calls your app already makes, then serves them back on replay so tests run with no dependencies attached.
Keploy records a GET call to /api/v1/orders/{id} on a RabbitMQ service and captures the dependency calls it makes.
RabbitMQ clients Keploy records, driver by driver
Keploy captures RabbitMQ at the wire protocol, so 4 of these 7 clients need no adapter, no test double, and no RabbitMQ instance in CI.
- Auto-mocked
Node.jsView page
amqplib and the Nest RabbitMQ transport
- Auto-mocked
PythonView page
pika and aio-pika
- Auto-mocked
JavaView page
the RabbitMQ Java client and Spring AMQP
- Auto-mocked
GoView page
amqp091-go
- Partial
.NETView page
RabbitMQ.Client and MassTransit
- Partial
RubyView page
Bunny
- Partial
PHPView page
php-amqplib
Your first RabbitMQ test suite in under five minutes
Every command below runs against your existing RabbitMQ service. Nothing in your source tree changes.
1Install the Keploy CLI
A single binary. It needs a Linux kernel with eBPF support, or Docker on macOS and Windows — and it adds nothing to your project's dependencies.
curl -sSL https://keploy.io/install.sh | bash2Record your service
Pass the command you already use to start the app. Keploy runs it and watches every socket it opens.
keploy record -c "./orders-service"3Exercise the paths you care about
Trigger the endpoint that publishes, then let your consumer process the message so both halves of the exchange are recorded.
curl -X POST localhost:8080/orders/ord_1/confirm -d '{"paymentToken":"tok_123"}'4Replay in CI
Replay serves the recorded dependency responses, so the job needs no service containers and no Docker daemon.
keploy test -c "./orders-service" --delay 10
Ready to try it on your own RabbitMQ service?
Works with the rest of your RabbitMQ stack
Keploy records at the network layer, so framework and driver choices inside your RabbitMQ app do not change how it captures traffic.
Node.js
amqplib publishes and deliveries record identically.
Python
pika and aio-pika record at the protocol layer.
Java
Spring AMQP listeners run against recorded deliveries.
Go
amqp091-go publishes record with their confirms.
Apache Kafka
The queue page covers Kafka's protocol in depth.
Docker
Record in a container or on the host; replay needs neither.
Testing the rest of your stack
- Message Queues
Keploy as a Apache Kafka testing framework
Test producers and consumers against recorded broker exchanges — no embedded Kafka, no Testcontainers cluster, no flaky poll loops.
Read the guide - Languages
Keploy as a Node.js testing framework
Replace nock registrations and in-memory database fixtures with tests recorded from the traffic your Node service already serves.
Read the guide - Languages
Keploy as a Python testing framework
Turn the requests your Python service already handles into a pytest-grade regression suite, with every dependency mocked from the recording.
Read the guide - Languages
Keploy as a Java testing framework
Generate JUnit-grade integration tests for any JVM service by recording the traffic it already serves.
Read the guide - Languages
Keploy as a Go testing framework
Record a running Go binary once and get table-test-grade coverage with sqlmock-free database stubs and no httptest servers to maintain.
Read the guide - Caches & Stores
Keploy as a Redis testing framework
Record RESP traffic once and replay real cache hits, misses, TTLs, and pipeline responses without a Redis server in CI.
Read the guide
Join our GlobalCommunity
Connect with developers worldwide. Follow updates, ask questions, share feedback, and ship faster with other Keploy builders.
“Best report of integration and API tests I've seen — which we don't get from RestAssured.”
G2“Future of microservices testing. I don't write tests now!”
G2 · 5/5“An amazing product that simplifies the automation.”
Gartner · 4.0