Description
php-amqplib is a pure PHP client for RabbitMQ, the message broker, and implements the AMQP 0-9-1 protocol. Because it is written entirely in PHP, it needs no extension to be installed on the server. The library has been tested against RabbitMQ and was used for the PHP examples in RabbitMQ in Action and the official RabbitMQ tutorials. You install it with Composer, and then use its classes to connect to a broker, declare exchanges and queues, publish messages and consume them. The README includes a working example in which one terminal runs a consumer and another publishes messages, and a non-blocking consumer example that lets you listen to the sockets used for the connection. Starting with version 2.0 the library uses AMQP 0.9.1 by default and requires RabbitMQ 2.0 or later. It supports several RabbitMQ extensions, including exchange-to-exchange bindings, basic nack, publisher confirms and consumer cancel notifications, along with alternate exchanges. Two related projects are listed: enqueue, which provides an AMQP interop wrapper, and AMQProxy, which pools and reuses connections and channels. The library is maintained by a group that includes engineers from the RabbitMQ team, and it is released under an open source licence on GitHub and Packagist.…
Highlights
- Pure PHP AMQP 0-9-1 client
- No PHP extension required
- Publisher confirms and basic nack
- Non-blocking consumer example
- Installs with Composer
Ratings & Reviews
No ratings yet
Be the first to rate PHP Amqplib.
People also visit
PHP Amqplib FAQ
What is php-amqplib?
It is a pure PHP client library for RabbitMQ that implements the AMQP 0-9-1 protocol.
Do I need a PHP extension?
No. The library is pure PHP, so it does not require a compiled extension.
How do I install it?
Install it with Composer, then use its classes in your PHP files.
Which RabbitMQ version is needed?
Version 2.0 and later of the library requires RabbitMQ 2.0 or later.
Which extensions are supported?
Exchange-to-exchange bindings, basic nack, publisher confirms, consumer cancel notifications and alternate exchanges.
Is it free?
Yes. It is an open source library published on GitHub and Packagist.
What are the best PHP Amqplib alternatives?
Popular alternatives to PHP Amqplib include Bunny, RabbitMqBundle and Rabbitmq Server. See all PHP Amqplib alternatives


