# php-amqplib/php-amqplib

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/php-amqplib-php-amqplib).**

4,597 stars · 1,026 forks · PHP · LGPL-2.1

## Links

- GitHub: https://github.com/php-amqplib/php-amqplib
- Homepage: http://www.rabbitmq.com/getstarted.html
- awesome-repositories: https://awesome-repositories.com/repository/php-amqplib-php-amqplib.md

## Topics

`amqp` `hacktoberfest` `messaging` `php` `php-amqplib` `rabbitmq`

## Description

php-amqplib is a PHP library that implements the AMQP protocol to enable communication between applications and message brokers. It provides the necessary tools to integrate PHP applications with RabbitMQ for sending and receiving messages across decoupled services.

The library supports a wide range of messaging patterns, including asynchronous task processing, event-driven architectures, and remote procedure calls using correlation identifiers. It manages the full message lifecycle through publishing, queue declaration, and flexible consumption models using either push-based subscriptions or pull-based polling.

The project covers routing and topology management via exchange bindings and provides reliability features such as durable queues, persistent publishing, and explicit message acknowledgments. It also includes traffic management capabilities like message prefetch limiting and virtual channel multiplexing to optimize resource use.

Connection stability is handled through multi-host support and signal-driven heartbeat management.

## Tags

### Networking & Communication

- [AMQP Protocol Clients](https://awesome-repositories.com/f/networking-communication/amqp-protocol-clients.md) — Implements the AMQP protocol client to allow PHP applications to communicate with message brokers.
- [Broker Disk Persistence](https://awesome-repositories.com/f/networking-communication/communication-platforms-services/messaging-notification-systems/messaging-services/message-broker-infrastructure/message-brokers/broker-disk-persistence.md) — Sets message delivery modes that write data to disk, ensuring messages survive a broker restart. ([source](http://www.rabbitmq.com/tutorials/amqp-concepts.html))
- [RabbitMQ Integrations](https://awesome-repositories.com/f/networking-communication/communication-platforms-services/messaging-notification-systems/messaging-services/rabbitmq-integrations.md) — Provides a comprehensive PHP implementation for producing and consuming messages through RabbitMQ brokers.
- [TCP Socket Clients](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/communication-protocols-standards/network-protocols/connection-establishment-protocols/tcp-socket-clients.md) — Establishes raw TCP socket clients to transmit binary data streams between the application and messaging host.
- [Message Acknowledgement Handlers](https://awesome-repositories.com/f/networking-communication/incoming-message-processors/message-acknowledgement-handlers.md) — Provides explicit and automatic message acknowledgement handlers to control message removal from the broker. ([source](http://www.rabbitmq.com/tutorials/amqp-concepts.html))
- [Message Delivery Guarantees](https://awesome-repositories.com/f/networking-communication/message-delivery-guarantees.md) — Ensures reliable message transmission using explicit acknowledgments and data replication across clusters. ([source](http://www.rabbitmq.com/))
- [Consumption Models](https://awesome-repositories.com/f/networking-communication/message-queue-clients/consumption-models.md) — Supports multiple message consumption models, including push-based subscriptions and pull-based polling. ([source](http://www.rabbitmq.com/tutorials/amqp-concepts.html))
- [Exchange-Based Routing](https://awesome-repositories.com/f/networking-communication/messaging-channel-management/pub-sub-subscriptions/pattern-based-routing/exchange-based-routing.md) — Provides routing via specialized exchange types including direct matching, broadcast fanout, and pattern-based topics. ([source](http://www.rabbitmq.com/tutorials/amqp-concepts.html))
- [Binary Frame Serialization](https://awesome-repositories.com/f/networking-communication/network-protocol-implementations/binary-serialization-protocols/binary-frame-serialization.md) — Translates high-level message objects into binary frames for efficient network transmission via the AMQP protocol.
- [Batch Publishing](https://awesome-repositories.com/f/networking-communication/communication-platforms-services/messaging-notification-systems/messaging-services/message-broker-infrastructure/publish-subscribe-messaging/batch-publishing.md) — Optimizes network throughput by grouping multiple messages for a single exchange and routing key. ([source](https://cdn.jsdelivr.net/gh/php-amqplib/php-amqplib@master/README.md))
- [Decoupled Communication Services](https://awesome-repositories.com/f/networking-communication/decoupled-communication-services.md) — Connects decoupled services through a standardized messaging protocol to exchange data without direct dependencies.
- [Consumer Prefetch Limits](https://awesome-repositories.com/f/networking-communication/quality-of-service-implementations/consumer-prefetch-limits.md) — Balances worker workloads by capping the number of unacknowledged messages a consumer can receive. ([source](http://www.rabbitmq.com/tutorials/amqp-concepts.html))
- [Remote Procedure Calls](https://awesome-repositories.com/f/networking-communication/remote-procedure-calls.md) — Implements mechanisms for executing functions on remote servers via request-response patterns over RabbitMQ queues.
- [Virtual Channel Multiplexing](https://awesome-repositories.com/f/networking-communication/virtual-channel-multiplexing.md) — Simulates multiple independent communication sessions over a single TCP connection to reduce system resource overhead.

### Part of an Awesome List

- [Durable Queue Definitions](https://awesome-repositories.com/f/awesome-lists/devtools/task-queues/durable-task-processors/durable-message-processing/durable-queue-definitions.md) — Provides the ability to create durable and exclusive queues that survive broker restarts. ([source](http://www.rabbitmq.com/tutorials/amqp-concepts.html))

### Data & Databases

- [Delivery Acknowledgements](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/data-persistence-storage/delivery-acknowledgements.md) — Implements a handshake protocol requiring explicit confirmation signals before messages are removed from the broker.
- [Message Routing](https://awesome-repositories.com/f/data-databases/message-brokers/message-routing.md) — Implements routing logic to distribute messages from publishers to one or many consumers using federation rules. ([source](http://www.rabbitmq.com/))
- [Server-Pushed Message Streams](https://awesome-repositories.com/f/data-databases/typed-data-collections/sequence-management/asynchronous-streams/multiplexed-message-streams/server-pushed-message-streams.md) — Enables the broker to stream messages to the client as they arrive without requiring constant polling.
- [Virtual-Host Isolation](https://awesome-repositories.com/f/data-databases/multitenancy-isolation/virtual-host-isolation.md) — Implements isolation of users and queues into separate virtual host environments within a single broker. ([source](http://www.rabbitmq.com/tutorials/amqp-concepts.html))

### DevOps & Infrastructure

- [Message Rejections](https://awesome-repositories.com/f/devops-infrastructure/queue-management/message-queues/message-consumption/message-rejections.md) — Allows consumers to reject failed messages, triggering either a discard or a return to the queue for reprocessing. ([source](http://www.rabbitmq.com/tutorials/amqp-concepts.html))
- [Queue Declarations](https://awesome-repositories.com/f/devops-infrastructure/queue-management/message-queues/message-queue-configurations/queue-declarations.md) — Allows programmatic definition and creation of queues with specific durability and exclusivity settings. ([source](http://www.rabbitmq.com/tutorials/tutorial-one-php.html))
- [RabbitMQ Publishers](https://awesome-repositories.com/f/devops-infrastructure/queue-management/message-queues/rabbitmq-publishers.md) — Provides capabilities for sending authenticated byte arrays to named RabbitMQ queues. ([source](http://www.rabbitmq.com/tutorials/tutorial-one-php.html))
- [Queue and Exchange Orchestration](https://awesome-repositories.com/f/devops-infrastructure/queue-management/message-queues/rabbitmq-publishers/queue-and-exchange-orchestration.md) — Manages the structural relationship and routing logic between message exchanges and specific queues. ([source](http://www.rabbitmq.com/tutorials/amqp-concepts.html))
- [Asynchronous Task Processing](https://awesome-repositories.com/f/devops-infrastructure/automation-orchestration/task-execution-frameworks/task-job-management/task-queues/asynchronous-task-processing.md) — Offloads heavy computational work to background workers via a message broker to maintain application responsiveness.

### Software Engineering & Architecture

- [Asynchronous Service Decoupling](https://awesome-repositories.com/f/software-engineering-architecture/asynchronous-service-decoupling.md) — Uses queues to prevent producers from blocking while waiting for consumers to process data. ([source](http://www.rabbitmq.com/))
- [Event-Driven Architectures](https://awesome-repositories.com/f/software-engineering-architecture/event-driven-architectures.md) — Enables the construction of reactive systems that route events to multiple independent consumers.
- [Integrated Event Storage and Streaming](https://awesome-repositories.com/f/software-engineering-architecture/event-sourcing/event-consumers/integrated-event-storage-and-streaming.md) — Supports appending events to persistent streams that can be read and sought independently by multiple consumers. ([source](http://www.rabbitmq.com/))

### System Administration & Monitoring

- [Connection Heartbeats](https://awesome-repositories.com/f/system-administration-monitoring/connection-heartbeats.md) — Manages periodic heartbeats using signal triggers to verify server responsiveness and keep connections alive. ([source](https://cdn.jsdelivr.net/gh/php-amqplib/php-amqplib@master/README.md))

### User Interface & Experience

- [Request Correlation Tokens](https://awesome-repositories.com/f/user-interface-experience/request-state-tracking/request-lifecycle-tracking/request-correlation-tokens.md) — Uses unique correlation identifiers to link asynchronous responses back to their original requests for RPC patterns.
