PHPackages                             riorizkyrainey/pubsub-redis-php - 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. riorizkyrainey/pubsub-redis-php

ActiveLibrary[Caching](/categories/caching)

riorizkyrainey/pubsub-redis-php
===============================

Pub/Sub Redis for php

0.1.0(6y ago)3822MITPHPPHP &gt;=7.2.0CI failing

Since Jun 19Pushed 6y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

Pub/Sub Redis for PHP
=====================

[](#pubsub-redis-for-php)

Pub/Sub Redis for php

[![PHP Composer](https://github.com/RioRizkyRainey/pubsub-redis-php/workflows/PHP%20Composer/badge.svg)](https://github.com/RioRizkyRainey/pubsub-redis-php/workflows/PHP%20Composer/badge.svg)

Getting Started
---------------

[](#getting-started)

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Prerequisites

[](#prerequisites)

Before you go make sure you already install Redis.

### Installing

[](#installing)

Install with composer

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

```

Usage - Subscribe
-----------------

[](#usage---subscribe)

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

$redisSubscribeAdapter = new \RioRizkyRainey\PubsubRedis\RedisSubscribeAdapter();
$redisSubscribeAdapter->setClient($client)
    ->setChannel('channel')
    ->subscribe(function ($message) {
        printf($message . PHP_EOL);
    });

```

Usage - Publisher
-----------------

[](#usage---publisher)

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

$redisPublishAdapter = new \RioRizkyRainey\PubsubRedis\RedisPublishAdapter();
$redisPublishAdapter->setClient($client)
    ->setChannel('channel');

$redisPublishAdapter->publishMessage('Hi, How do you do?');
$redisPublishAdapter->publishBulkMessage(['Nice to meet you', 'Where are you going?']);
$redisPublishAdapter->publishMessage('I don\'t feel good mr stark');

```

Built With
----------

[](#built-with)

- [Predis](https://github.com/nrk/predis) - Flexible and feature-complete Redis client for PHP and HHVM
- [PHPUnit](https://github.com/sebastianbergmann/phpunit) - The PHP Unit Testing framework.
- [Mockery](https://github.com/mockery/mockery) - Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit

Contributing
------------

[](#contributing)

Please read [CONTRIBUTING.md](https://github.com/RioRizkyRainey/pubsub-redis-php/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.

Versioning
----------

[](#versioning)

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/RioRizkyRainey/pubsub-redis-php/tags).

Authors
-------

[](#authors)

- **Rio Rizky Rainey** - *Initial work* - ()

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

Acknowledgments
---------------

[](#acknowledgments)

- Inspired from [Superbalist](https://github.com/Superbalist)

###  Health Score

24

—

LowBetter than 30% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2250d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7441552?v=4)[Rio Rizky Rainey Ferbiansyah](/maintainers/RioRizkyRainey)[@RioRizkyRainey](https://github.com/RioRizkyRainey)

---

Top Contributors

[![RioRizkyRainey](https://avatars.githubusercontent.com/u/7441552?v=4)](https://github.com/RioRizkyRainey "RioRizkyRainey (10 commits)")

---

Tags

phpredispubsubpubsub php

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[mjphaynes/php-resque

Redis backed library for creating background jobs and processing them later.

228202.1k3](/packages/mjphaynes-php-resque)

PHPackages © 2026

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