PHPackages                             milind/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. [Queues &amp; Workers](/categories/queues)
4. /
5. milind/php-pubsub-redis

ActiveLibrary[Queues &amp; Workers](/categories/queues)

milind/php-pubsub-redis
=======================

A Redis adapter for the php-pubsub package

08PHP

Since Jul 15Pushed 5y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

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

[](#php-pubsub-redis)

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

[![Author](https://camo.githubusercontent.com/89d1829c61afc8a92333fe0e830ad71714d9fa0cb84cea315ba6162304ff688b/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d406d696c696e642d626c75652e7376673f7374796c653d666c61742d737175617265)](https://twitter.com/milind)[![Build Status](https://camo.githubusercontent.com/31d635c9aa1b75405c1326e7ae1dbe86dc1947896bca6dd7a2ae0f843b67d3e5/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d696c696e642f7068702d7075627375622d72656469732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/milind/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/f84ae3e034c9f2796bf739f061916bf378e5ad2165d81b71f215234f125cba64/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d696c696e642f7068702d7075627375622d72656469732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/milind/php-pubsub-redis)[![Total Downloads](https://camo.githubusercontent.com/949f23a18991fe2651d0e9cf8b078be4c5d98fed1c9805f228d659aafeaa0895/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d696c696e642f7068702d7075627375622d72656469732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/milind/php-pubsub-redis)

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

[](#installation)

```
composer require milind/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 \milind\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

16

—

LowBetter than 4% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/dd0035e6fda13036e33240c5018bba0914101219b774998cebb073c4a7ef2abe?d=identicon)[little-isaac](/maintainers/little-isaac)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[chrisboulton/php-resque-scheduler

php-resque-scheduler is a PHP port of resque-scheduler, which adds support for scheduling items in the future to Resque.

2712.5M14](/packages/chrisboulton-php-resque-scheduler)[uecode/qpush-bundle

Asynchronous processing for Symfony using Push Queues

1672.6M2](/packages/uecode-qpush-bundle)[schickling/queue-checker

Command to check the queue health status

275.8k](/packages/schickling-queue-checker)[mayconbordin/l5-stomp-queue

Stomp Queue Driver for Laravel 5

121.1k](/packages/mayconbordin-l5-stomp-queue)

PHPackages © 2026

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