kunalvarma05/laravel-rabbitmq
Laravel RabbitMQ integration package for publishing and consuming messages with configurable connections, queues, and exchanges. Provides a simple Laravel-friendly API and artisan commands for working with RabbitMQ in your applications.
Architecture fit. kunalvarma05/laravel-rabbitmq is a thin convenience layer over php-amqplib: a service provider that binds a connection/channel manager into the container, a RabbitMQ facade, and a publish-oriented config file. It is not an implementation of Laravel's Queue/Connector contracts, so it does not give you dispatch(), queue:work, job retries, failed_jobs, or Horizon-style visibility. Teams evaluating it as "RabbitMQ as the Laravel queue backend" are looking at the wrong package — that role belongs to a queue-driver implementation. The correct mental model is "an AMQP publishing client with Laravel ergonomics." It fits cleanly where the requirement is "emit an event into an existing RabbitMQ estate that other services consume."
Integration feasibility. Mechanically trivial: composer require, publish the config, register the provider (pre-auto-discovery), optionally alias the facade. The public API is a handful of methods. A competent Laravel engineer can produce a working spike in under a day. The cost is not integration effort — it is the due diligence around what the package doesn't do.
Technical risk.
composer why-not before committing.php-amqplib pulls ext-bcmath, ext-sockets, and ext-json; it is synchronous and blocking. That is fine for CLI workers, awkward inside an FPM request path.basic_publish is fire-and-forget; without confirm_select, "published" means "written to a socket," and messages vanish on broker restart or channel error.Key questions to resolve before approval.
basic_consume support, or publish only?basic_return handling?amqps configuration support.Stack fit. Use it as a publisher-only adapter in a Laravel service that sits alongside non-PHP consumers, or where the queue topology is owned by a platform team. Do not adopt it as the ingestion path for Laravel jobs. If the requirement is genuinely "Laravel queue backed by RabbitMQ," prefer a maintained queue driver; if the requirement is "emit domain events into RabbitMQ," this package (forked) is a reasonable, low-ceremony fit.
Migration path. Two acceptable shapes:
EventPublisher interface so the transport is swappable. This is the important move — the interface, not the package, is the integration contract.app/Support/RabbitMQ or a private Composer VCS repo, repoint the namespace, and take ownership. Given the surface area is a few hundred lines, vetting and internalizing it is cheaper than a two-sprint evaluation of a heavier alternative.Compatibility checklist. PHP 8.1+ / Laravel 10+ compatibility confirmed by composer update --dry-run; ext-bcmath and ext-sockets present in all runtime images (including the FPM image, not just the worker); broker version and vhost permissions validated; AMQP URI parsing behavior confirmed for amqps://.
Sequencing.
php-amqplib consumer.EventPublisher interface; add confirm mode, mandatory flag, TLS config, structured logging, and a timeout/retry policy. Add an outbox table if publish reliability matters.Maintenance. Effectively unmaintained upstream. Treat fork ownership as a standing ~5–10% FTE of one backend engineer, front-loaded in the first month and then near-zero because the code is small. The genuine maintenance burden is not the package — it is the AMQP domain knowledge and the broker operations around it.
Support. No vendor, no SLA, stale issue tracker. Escalation path is internal. This is acceptable precisely because the failure surface is inspectable; it is not acceptable if the team expects to file bugs upstream and get fixes.
Scaling. Publishing is synchronous and blocking — each publish adds broker round-trip latency to the request path unless confirms are disabled or publishing is offloaded to a queue/outbox. Connection-per-request will not scale past modest throughput; enforce a singleton connection per process with explicit reconnect logic. Consumers scale horizontally but require deliberate prefetch_count tuning and a separate worker tier from web traffic. Watch broker-side channel limits and per-connection memory in long-lived consumers (a known php-amqplib characteristic).
Failure modes to instrument from day one.
Ramp-up. The package API is an afternoon. AMQP semantics — exchange types, routing keys, bindings, prefetch, confirms, DLX — is a 2–3 day investment for a Laravel developer and is the real onboarding cost. On-call runbooks need broker-down, queue-backlog, and DLQ-drain procedures written before the first production producer ships.
Verdict. Approve only as a small, forked, publish-only adapter behind an internal interface in a service that already has a RabbitMQ estate and a team prepared to own ~300 lines of code. Reject if the intent is to use it as Laravel's queue driver, if no one owns broker operations, or if the team cannot absorb the fork. The low adoption score is not disqualifying for a wrapper this thin — but it does mean the package should be an implementation detail, never an architectural dependency.
How can I help you explore Laravel packages today?