PHPackages                             cerpus/pubsub - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. cerpus/pubsub

AbandonedArchivedLibrary

cerpus/pubsub
=============

Client for RabbitMQ pub-sub

v1.2.0(2y ago)010.1k↓100%1MITPHPPHP 8.0.\*|8.1.\*|8.2.\*|8.3.\*

Since Feb 14Pushed 2y ago1 watchersCompare

[ Source](https://github.com/cerpus/php-pubsub)[ Packagist](https://packagist.org/packages/cerpus/pubsub)[ RSS](/packages/cerpus-pubsub/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (3)Versions (7)Used By (1)

Cerpus\\PubSub
==============

[](#cerpuspubsub)

Simple publish-subscribe for RabbitMQ and PHP.

Requirements
------------

[](#requirements)

- PHP 8.0, 8.1, or 8.2
- The extensions required by [php-amqplib](https://packagist.org/packages/php-amqplib/php-amqplib)

Installation
------------

[](#installation)

```
composer require cerpus/pubsub
```

Usage
-----

[](#usage)

```
use Cerpus\PubSub\Connection\ConnectionFactory;
use Cerpus\PubSub\PubSub;

$connectionFactory = new ConnectionFactory('localhost', 5672, 'guest', 'guest', '/');
$pubSub = new PubSub($connectionFactory->connect());

// publish your own messages
$pubSub->publish('some_other_topic', 'some data');

// listen for incoming messages
$pubSub->subscribe('subscriber_name', 'some_topic', function (string $data) {
    // do something with the data
    echo "$data\n";
});
$pubSub->listen();
```

Future scope
------------

[](#future-scope)

- Support ext-amqp, queue-interop
- Handle more exceptions from underlying libraries
- Support configuring flags like auto-delete, etc.

License
-------

[](#license)

This package is released under the MIT license. See the `LICENSE` file for more information.

###  Health Score

33

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~218 days

Total

4

Last Release

842d ago

Major Versions

v0.1.0 → v1.0.02022-02-15

PHP version history (3 changes)v0.1.0PHP 8.0.\* || 8.1.\*

v1.1.0PHP 8.0.\*|8.1.\*|8.2.\*

v1.2.0PHP 8.0.\*|8.1.\*|8.2.\*|8.3.\*

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c90acdd5f5be43c562112cef1f69ab98614691bc737089cb1becd9d6b22e046?d=identicon)[max\_edlib](/maintainers/max_edlib)

---

Top Contributors

[![emmachughes](https://avatars.githubusercontent.com/u/84008144?v=4)](https://github.com/emmachughes "emmachughes (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cerpus-pubsub/health.svg)

```
[![Health](https://phpackages.com/badges/cerpus-pubsub/health.svg)](https://phpackages.com/packages/cerpus-pubsub)
```

###  Alternatives

[php-amqplib/rabbitmq-bundle

Integrates php-amqplib with Symfony &amp; RabbitMq. Formerly emag-tech-labs/rabbitmq-bundle, oldsound/rabbitmq-bundle.

1.2k19.9M60](/packages/php-amqplib-rabbitmq-bundle)[magento/community-edition

Magento 2 (Open Source)

12.0k51.9k9](/packages/magento-community-edition)[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)[hyperf/amqp

A amqplib for hyperf.

241.2M47](/packages/hyperf-amqp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
