Pure PHP client for RabbitMQ and the AMQP 0-9-1 protocol
open sourceLGPL-2.1-or-laterfree
php-amqplib is a pure PHP implementation of the AMQP 0-9-1 protocol, tested against RabbitMQ and used for the PHP examples in RabbitMQ's official tutorials. Besides publishing and consuming it supports RabbitMQ's extensions (exchange-to-exchange bindings, basic nack, publisher confirms, consumer cancel notify), connections to several hosts, batch publishing, a body size limit for very large messages, and signal handling and signal-based heartbeats with the PCNTL extension. Ramūnas Dronga, Luke Bakken and VMware engineers working on RabbitMQ maintain it.
Problems it solves
- publish and consume RabbitMQ messages from my PHP app
- talk AMQP 0-9-1 from PHP without installing an extension
- use publisher confirms with RabbitMQ in PHP
Features
- pure PHP AMQP 0-9-1, no extension needed
- RabbitMQ extensions: exchange-to-exchange bindings, basic nack, publisher confirms, consumer cancel notify
- connections that try several hosts
- batch and optimised publishing
- a body size limit that truncates very large messages
- UNIX signal handling and signal-based heartbeats with PCNTL
Limitations
- It's single-threaded, so it has no automatic connection recovery: you reconnect yourself by handling its connection exceptions.1