PHPackages                             superbalist/php-pubsub-redis - 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. [Caching](/categories/caching)
4. /
5. superbalist/php-pubsub-redis

AbandonedArchivedLibrary[Caching](/categories/caching)

superbalist/php-pubsub-redis
============================

A Redis adapter for the php-pubsub package

2.0.0(9y ago)25311.4k—1.2%13[1 issues](https://github.com/Superbalist/php-pubsub-redis/issues)[1 PRs](https://github.com/Superbalist/php-pubsub-redis/pulls)12MITPHPPHP &gt;=5.6.0

Since Sep 3Pushed 3y ago35 watchersCompare

[ Source](https://github.com/Superbalist/php-pubsub-redis)[ Packagist](https://packagist.org/packages/superbalist/php-pubsub-redis)[ RSS](/packages/superbalist-php-pubsub-redis/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (5)Used By (12)

php-pubsub-redis
================

[](#php-pubsub-redis)

A Redis adapter for the [php-pubsub](https://github.com/Superbalist/php-pubsub) package.

[![Author](https://camo.githubusercontent.com/abd4e3e2e71081ad01ef09a60c49d70c5e0677497f38918e740703cd02605078/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d40737570657262616c6973742d626c75652e7376673f7374796c653d666c61742d737175617265)](https://twitter.com/superbalist)[![Build Status](https://camo.githubusercontent.com/a6ee11fa8b480dcf658071e44dd4258ad672e9a3f196d55cc4c9e0f22d8ab4f9/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f537570657262616c6973742f7068702d7075627375622d72656469732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/Superbalist/php-pubsub-redis)[![StyleCI](https://camo.githubusercontent.com/bf6792220be05652c3031b54c7aedfc58c70a1dde9cda99e2b8d2051e4382f73/68747470733a2f2f7374796c6563692e696f2f7265706f732f36373235323531332f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/67252513)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Packagist Version](https://camo.githubusercontent.com/2e32802e35ba278f47c2b1be8715d54f78111282b95ac1cdec30f64cf83f4bd5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737570657262616c6973742f7068702d7075627375622d72656469732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/superbalist/php-pubsub-redis)[![Total Downloads](https://camo.githubusercontent.com/9139157bdbfef09b781a4a6c2385fa30ca5dbddb45697edcf8d0c8ba1dd2ecb5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f737570657262616c6973742f7068702d7075627375622d72656469732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/superbalist/php-pubsub-redis)

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

[](#installation)

```
composer require superbalist/php-pubsub-redis
```

Usage
-----

[](#usage)

```
$client = new Predis\Client([
    'scheme' => 'tcp',
    'host' => '127.0.0.1',
    'port' => 6379,
    'database' => 0,
    'read_write_timeout' => 0
]);

$adapter = new \Superbalist\PubSub\Redis\RedisPubSubAdapter($client);

// consume messages
// note: this is a blocking call
$adapter->subscribe('my_channel', function ($message) {
    var_dump($message);
});

// publish messages
$adapter->publish('my_channel', 'HELLO WORLD');
$adapter->publish('my_channel', ['hello' => 'world']);
$adapter->publish('my_channel', 1);
$adapter->publish('my_channel', false);

// publish multiple messages
$messages = [
    'message 1',
    'message 2',
];
$adapter->publishBatch('my_channel', $messages);
```

Examples
--------

[](#examples)

The library comes with [examples](examples) for the adapter and a [Dockerfile](Dockerfile) for running the example scripts.

Run `make up`.

You will start at a `bash` prompt in the `/opt/php-pubsub` directory.

If you need another shell to publish a message to a blocking consumer, you can run `docker-compose run php-pubsub-redis /bin/bash`

To run the examples:

```
$ php examples/RedisConsumerExample.php
$ php examples/RedisPublishExample.php (in a separate shell)
```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity45

Moderate usage in the ecosystem

Community27

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 82.4% 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 ~127 days

Total

3

Last Release

3290d ago

Major Versions

1.0.1 → 2.0.02017-05-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/8b8f533cf5a84c29d3860ee32356f0554ead023247638ea952353fc2f01b2e5d?d=identicon)[superbalist](/maintainers/superbalist)

---

Top Contributors

[![matthewgoslett](https://avatars.githubusercontent.com/u/1571743?v=4)](https://github.com/matthewgoslett "matthewgoslett (14 commits)")[![shad0wfir3](https://avatars.githubusercontent.com/u/20926935?v=4)](https://github.com/shad0wfir3 "shad0wfir3 (3 commits)")

---

Tags

phpphp-pubsubphp-pubsub-redisredissuperbalist

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/superbalist-php-pubsub-redis/health.svg)

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

###  Alternatives

[rhubarbgroup/redis-cache

A persistent object cache backend for WordPress powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI.

51795.3k1](/packages/rhubarbgroup-redis-cache)[monospice/laravel-redis-sentinel-drivers

Redis Sentinel integration for Laravel and Lumen.

103830.5k](/packages/monospice-laravel-redis-sentinel-drivers)[jamescauwelier/psredis

Sentinel client for the popular php redis client

77392.9k5](/packages/jamescauwelier-psredis)[cache/predis-adapter

A PSR-6 cache implementation using Redis (Predis). This implementation supports tags

272.6M13](/packages/cache-predis-adapter)[symfony-bundles/redis-bundle

Symfony Redis Bundle

271.1M5](/packages/symfony-bundles-redis-bundle)[pdffiller/qless-php

PHP Bindings for qless

29113.2k1](/packages/pdffiller-qless-php)

PHPackages © 2026

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