Messaging / PHP

One API for20 messaging systems

Pure PHP publish, receive and ack across 20 systems, 13 protocol stacks and 6 frameworks.

Xiaodi, the messaging-php robot messenger, the messaging project pet

One API for every message system

messaging-php implements publishing and consumption in pure PHP: TCP uses stream_socket_client, cloud APIs use Guzzle, and no broker SDK or extension is required.

Twenty product names collapse into 13 protocol stacks. Switching brokers usually means changing the driver and connection config while business code stays the same.

  • One Manager facade
  • 20 drivers implemented
  • Six optional adapters
20Systems covered
20Drivers implemented
v1.8.1Current version
Xiaodi, the messaging-php robot messenger Smile expression

Xiaodi

A round light-blue and white robot messenger with cyan pixel eyes on a dark screen, a blue paper-plane antenna, a PHP-purple scarf, and a chest mail slot with three blue, teal and purple status lights, waving its right hand.

Signal strong, message delivered.

Capabilities from publish to ack

One contract, explicit capabilities and pure-PHP transports across brokers.

Unified API

publish, receive, consume, ack and reject share one calling convention.

Pure-PHP transports

TCP runs on stream_socket_client, with protocol codecs written in PHP.

Capability model

capabilities() answers at runtime; unsupported features throw instead of degrading silently.

Framework adapters

Laravel, ThinkPHP, webman, Hyperf, Yii2 and Yii3; Composer copies each framework config on install.

Connection manager

default plus connections config, cached by name, with disconnect() for reconnects.

Four test layers

742 unit/protocol tests plus fake-broker, contract and heavy Docker integration matrices.

How the features grew

Four recent driver milestones, from P2 to P5.

v1.8.0

Audit fixes and real brokers

RocketMQ heartbeat/offsets, Manager reconnect, Pulsar compatibility and CI hardening.

v1.7.0

Automatic framework config

Composer plugin copies config per framework; Yii3 merges automatically.

v1.6.0

All 20 driver names implemented

Pulsar and RocketMQ complete the full 20-system coverage.

v1.5.0

Kafka family drivers

Kafka, Redpanda, AutoMQ, Confluent and Event Hubs share one protocol stack.

Changelog

Recent releases; the full list is on GitHub Releases.

Latest v1.8.1 All versions
v1.8.12026-10-30

Documentation, diagrams and animated pet refresh.

v1.8.02026-10-30

Audit fixes, real Pulsar compatibility and CI hardening.

v1.7.02026-10-30

Automatic framework config copying via Composer plugin.

v1.6.12026-10-30

Final hardening: 20-driver registry test and P1-P5 diagrams.

v1.6.02026-10-30

P5: Pulsar and RocketMQ; all 20 drivers implemented.

v1.5.02026-10-30

P4: five Kafka-family drivers added; 18 total.

v1.4.02026-10-30

P3: RabbitMQ and ZeroMQ added; 13 total.

v1.3.02026-10-30

Added AWS, GCP and Azure cloud drivers, bringing the total to 11.

v1.2.02026-10-29

Added PHP framework integrations and driver documentation.

v1.1.02026-10-29

Implemented P1 drivers: beanstalkd, redis, nsq, stomp and nats.

v1.0.12026-10-29

Fixed empty test directories being dropped in CI.

v1.0.02026-10-29

Initial release: core API and driver contracts.

Install and usage

Install, then publish, receive and ack with Redis Streams.

PHP >= 8.0 / ComposerFull README
Install
composer config allow-plugins.erikwang2013/messaging-php true
composer require erikwang2013/messaging-php
Minimal example
use Erikwang2013\Messaging\Contract\Message;
use Erikwang2013\Messaging\Contract\ReceiveOptions;
use Erikwang2013\Messaging\Manager;

$mq = new Manager([
    'default' => 'redis',
    'connections' => [
        'redis' => [
            'driver' => 'redis',
            'host' => '127.0.0.1',
            'port' => 6379,
            'group' => 'orders',
        ],
    ],
]);

$connection = $mq->connection();
$connection->publish('orders', Message::json(['id' => 1]));

while ($message = $connection->receive('orders', new ReceiveOptions(timeoutMs: 5000))) {
    $message->ack();
}

Twelve animated Xiaodi expressions

Every expression has a subtle animation; hover to watch.

Search this site

Try “upload”, “migration” or “JWT”.