PHPackages                             iankibet/redis-stream - 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. iankibet/redis-stream

ActiveLibrary

iankibet/redis-stream
=====================

A Laravel package to listen to Redis published messages.

1.0.3(10mo ago)01.3k↑42.9%MITPHP

Since Jun 16Pushed 10mo agoCompare

[ Source](https://github.com/iankibet/redis-stream)[ Packagist](https://packagist.org/packages/iankibet/redis-stream)[ RSS](/packages/iankibet-redis-stream/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)DependenciesVersions (5)Used By (0)

Laravel Redis Stream Package
============================

[](#laravel-redis-stream-package)

[![Latest Stable Version](https://camo.githubusercontent.com/f00480ea855b0a79e00ca64f250f93c3f0ee2cc1bcbf393ff6c1c5d98d2df3cc/68747470733a2f2f706f7365722e707567782e6f72672f69616e6b696265742f72656469732d73747265616d2f762f737461626c65)](https://packagist.org/packages/iankibet/redis-stream)[![Total Downloads](https://camo.githubusercontent.com/63be317b098f84b5454f1063385374ffae29c5ce4e848bcdca23de698ab40e15/68747470733a2f2f706f7365722e707567782e6f72672f69616e6b696265742f72656469732d73747265616d2f646f776e6c6f616473)](https://packagist.org/packages/iankibet/redis-stream)[![License](https://camo.githubusercontent.com/cc39acd4802cad50e64860839a73ff34ca83f5e6c534a0c2d579d9599d5e45ef/68747470733a2f2f706f7365722e707567782e6f72672f69616e6b696265742f72656469732d73747265616d2f6c6963656e7365)](https://packagist.org/packages/iankibet/redis-stream)

A Laravel package to use Redis Streams for lightweight, scalable inter-service communication or job/event dispatching.

---

🚀 Features
----------

[](#-features)

- Simple Redis Streams integration
- Stream-to-handler mapping via config
- Supports multiple consumers under the same group
- Automatically dispatches Jobs or Events
- Clean CLI command with optional consumer override

---

🛠 Installation
--------------

[](#-installation)

```
composer require iankibet/redis-stream
```

Publish the config:

```
php artisan vendor:publish --tag=redis-stream
```

---

⚙️ Configuration
----------------

[](#️-configuration)

Edit the generated config file at `config/redis-stream.php`:

```
return [
    'group' => env('REDIS_STREAM_GROUP', env('APP_NAME', 'laravel')),

    'consumer' => env('REDIS_STREAM_CONSUMER', env('REDIS_STREAM_GROUP', env('APP_NAME', 'laravel'))),

    'handlers' => [
        'user_activity' => [
            App\Jobs\ProcessUserActivity::class,
        ],
        'order_events' => [
            App\Events\OrderCreated::class,
        ],
    ],
];
```

---

📥 Publishing to a Stream
------------------------

[](#-publishing-to-a-stream)

You can publish messages using the `RedisStream` facade:

```
use Iankibet\RedisStream\RedisStream;

RedisStream::publish('order_events', [
    'order_id' => 123,
    'status' => 'created',
]);
```

---

🧑‍💻 Consuming Messages
----------------------

[](#‍-consuming-messages)

Run the consumer using:

```
php artisan redis:consume-stream
```

Or provide a specific consumer name:

```
php artisan redis:consume-stream worker-1
```

> Messages are read from all streams defined in the config and dispatched automatically to jobs or events.

---

🧪 Testing
---------

[](#-testing)

Run the tests:

```
php artisan test
```

---

🧠 Notes
-------

[](#-notes)

- Each message is delivered to **only one consumer** in a group.
- Redis automatically tracks pending/unacknowledged messages.
- You should monitor or use `XPENDING` and `XCLAIM` to handle stuck messages in production.

---

📄 License
---------

[](#-license)

MIT © Ian Kibet

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance56

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

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 ~0 days

Total

4

Last Release

327d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d0a938e18a864899b0a7963fc0e63d48be5d7ec5ecc5543ff9423bf85905ba4f?d=identicon)[ictianspecialist](/maintainers/ictianspecialist)

### Embed Badge

![Health badge](/badges/iankibet-redis-stream/health.svg)

```
[![Health](https://phpackages.com/badges/iankibet-redis-stream/health.svg)](https://phpackages.com/packages/iankibet-redis-stream)
```

PHPackages © 2026

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