pdezwart/php-amqp
php-amqp is a PHP extension that wraps librabbitmq to provide AMQP 0-9-1 support, letting applications connect to RabbitMQ to publish and consume messages and manage queues and exchanges. It offers a fast, native alternative to pure-PHP AMQP libraries.
librabbitmq, it publishes/consumes with lower CPU and memory per message than a pure‑PHP client, and supports persistent connections and heartbeats in long‑running workers. That translates directly into worker fleet size and per‑message infra cost at volume.Worth flagging to stakeholders: the package itself is not Laravel‑aware. It ships no service provider, no queue driver, no config. Laravel has no native AMQP driver. So "adopt this" actually means "adopt this plus a queue‑driver package (e.g. vladimir-yuldashev/laravel-queue-rabbitmq, which can wrap either this extension or php-amqplib) or write a connector." Budget for that integration explicitly; it is the hidden line item.
Adopt when:
php-dev, autoconf, and the extension compiled in.Look elsewhere when:
php-amqplib (same protocol, no build step).NOASSERTION. The project is under the PHP License 3.01, which is permissive, but legal should confirm before it enters a distributed product. Treat this as a one‑day blocker, not a red flag.Also note the maturity signal: ~584 stars and a modest opportunity score suggest a stable, unglamorous utility rather than an actively evolving package. That is fine for a protocol binding — but plan for the possibility that PHP‑version support lags on major releases, and keep the abstraction boundary thin enough to swap clients.
For executives (one paragraph): We are evaluating the standard PHP client for AMQP — the protocol behind RabbitMQ — to underpin background job processing and, later, service‑to‑service events. It is plumbing, not a feature: no user‑visible surface, but it is the difference between jobs that retry safely and jobs that silently vanish. The business case is reliability plus per‑message infrastructure cost at scale, and it is a prerequisite for the event‑driven items on the roadmap. Cost is engineering time to add a compiled extension to our images and to wire a Laravel queue driver, plus a short legal review of the license. Risk is concentration: it becomes a dependency of our deployment platform, so we would adopt it behind an internal interface that lets us swap to a pure‑PHP client without touching product code.
For engineering (the honest version): This is the C extension binding to librabbitmq — AMQPConnection / AMQPChannel / AMQPExchange / AMQPQueue, synchronous and blocking, so it fits our prefork/worker model and not an event loop. Upside versus php-amqplib: lower CPU and memory per message, persistent connections with heartbeats, native publisher confirms and QoS. Downside: it is a build‑time dependency — every image needs the extension, and we inherit coupling to PHP minor/major upgrades and to the extension's release cadence. It gives us nothing Laravel‑specific; we still need a queue driver package or our own connector. Recommendation if approved: wrap it behind a QueueClient interface with php-amqplib as the fallback implementation, so the extension is an optimization rather than a lock‑in.
How can I help you explore Laravel packages today?