codeception/module-amqp
Codeception module for testing AMQP messaging, usually RabbitMQ, in PHP. Adds helpers to declare queues and exchanges, publish messages, and grab or consume them in tests so you can verify message flows alongside your application code.
php-amqplib + custom setup/teardown, queue purging, message grabbing) inside your test bootstrap. This package is a thin, MIT-licensed wrapper that already solves the boring parts: declaring exchanges/queues, pushing and grabbing messages, asserting queue existence and contents, and cleaning up between tests. Buying costs one Composer dependency; building costs ongoing maintenance of test infrastructure nobody wants to own.Adopt when all of the following hold:
Look elsewhere when:
Queue::fake() plus assertPushed/assertDispatched covers the majority of application-level queue tests with zero infrastructure, and it's what your team already knows. Reach for a real broker only when the abstraction itself is under test.Queue::fake(); spinning up RabbitMQ for that is a tax on CI time and flakiness.inTransport() assertions are the idiomatic path and don't require Codeception.To executives: This is a small, free, MIT-licensed test utility that lets us prove message-driven features actually work before they reach production — catching misrouted messages, wrong payloads, and broken consumer wiring in CI rather than in incident review. Cost is one dependency and a Docker service in the pipeline. The honest caveat: it's a low-adoption package (4 GitHub stars, no downstream dependents), so treat it as a thin convenience layer we could replace in a day if it ever stalls — not a platform commitment. Maintenance signals are acceptable: it's under the Codeception org with a release as recent as July 2025.
To engineering: It's a thin wrapper over php-amqplib that gives us readable acceptance-test actions — see a queue, push to a queue, grab a message, purge, assert contents — plus configurable cleanup so suites don't bleed state into each other. Real value is testing across a real broker at the boundary, which mocks don't cover. Two guards: pin the version and keep usage confined to a small set of test helpers so a swap is cheap, and gate adoption on us actually running RabbitMQ in CI — otherwise Queue::fake() is the better default and this is unnecessary complexity. Don't adopt it as a reason to move to Codeception; adopt it only if we're already there.
How can I help you explore Laravel packages today?