PHPackages                             dweik/laravel-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. [Caching](/categories/caching)
4. /
5. dweik/laravel-redis-stream

ActiveLibrary[Caching](/categories/caching)

dweik/laravel-redis-stream
==========================

Laravel redis stream

1.1.3(1y ago)110.0k↑20%2MITPHPPHP ^7.4|^8.0

Since Dec 6Pushed 1y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (10)Used By (0)

Laravel Redis Stream
--------------------

[](#laravel-redis-stream)

This package using to manage the Redis stream messages listener by firing handler classes based on the defined channels. in this package, you could assign multiple classes to the same channel.

### Installation

[](#installation)

Require this package with composer using the following command:

```
composer require dweik/laravel-redis-stream
```

---

#### Laravel

[](#laravel)

Then you need to publish the config files by executing the following command

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

---

#### lumen

[](#lumen)

You need to add the follow line on `bootstrap/app.php` file:

```
$app->register(LaravelStream\Redis\StreamServiceProvider::class);
```

and make sure that you loaded ***Redis*** by add the follow line *(if exists no need to add)*

```
$app->register(Illuminate\Redis\RedisServiceProvider::class);
```

***NOTE** if you need more information to how setup redis on lumen you can check the official website by a [click here](https://lumen.laravel.com/docs/master/cache)*

Then you need to copy the streaming config file from `vendor/dweik/laravel-redis-stream/config/streaming.php` to `config/streaming.php`

---

On `config/streaming.php` file, you need to set up the Redis connection under the **redis** key. then you need to define the names of the channels by assigning handler classes as below example:

- note: *We prefer use **phpredis** driver*.

```
    'channels' => [
        'channel-name' => [
            App\Channels\SomeClassChannel::class
        ],
    ],
```

Also, you could define the trimming value for each channel under **trim** key. Ex.,

```
    'trim' => [
        'channel-name' => 1000, // it means keep 1000 messages at most
    ],
```

---

### Creating handler class

[](#creating-handler-class)

Use `artisan` command to make a new *handler class* by using the `make:channel-listener` function. then you can find it on the `app/Channels` path

```
    php artisan make:channel-listener SomeClassChannel
```

### Run channel listener

[](#run-channel-listener)

To run *channel listener* for all channels use the following command

```
    php artisan stream:run
```

To run a specific channel you could pass to the `--channel` option the channel name like :\_

```
    php artisan stream:run --channel=channel-name
```

### Send a message to Redis stream

[](#send-a-message-to-redis-stream)

There is a facade class that could handle the `xADD` command on redis

```
use LaravelStream\Redis\Facades\Stream;

class SomeClass {

    public function(){

        /*
        .
        . some code
        .
        */

        /**
        *
        * @var string  $channel   channel name
        * @var mixed   $data      the message data
        * @var integer $trim      (default null) the channel messages size,
        *                         when using (null) value, this package will use
        *                         the defined value on the config file "config/streaming.php".
        *                         when using (zero) value that means stop trimming function
        */

        $messageID = Stream::stream( $channel, $data, $trim);

    }

}
```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance46

Moderate activity, may be stable

Popularity27

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

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

Every ~104 days

Recently: every ~93 days

Total

9

Last Release

421d ago

PHP version history (2 changes)1.0.0PHP &gt;=7.4

1.1.0PHP ^7.4|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15715732?v=4)[Abdelqader Osama Aldweik](/maintainers/asd4abyd)[@asd4abyd](https://github.com/asd4abyd)

---

Top Contributors

[![asd4abyd](https://avatars.githubusercontent.com/u/15715732?v=4)](https://github.com/asd4abyd "asd4abyd (16 commits)")

---

Tags

streamlaravelartisanrediscommandchannelMicroservicexreadxadd

### Embed Badge

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

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

###  Alternatives

[monospice/laravel-redis-sentinel-drivers

Redis Sentinel integration for Laravel and Lumen.

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

An extension of Laravels Redis driver which supports connecting to a Redis master through Redis Sentinel.

38679.0k](/packages/namoshek-laravel-redis-sentinel)[yangusik/laravel-balanced-queue

Laravel queue management with load balancing between partitions (user groups)

786.4k](/packages/yangusik-laravel-balanced-queue)[vetruvet/laravel-phpredis

Use phpredis as the redis connection in Laravel

43123.7k](/packages/vetruvet-laravel-phpredis)[ginnerpeace/laravel-redis-lock

Simple redis distributed locks for Laravel.

15114.4k](/packages/ginnerpeace-laravel-redis-lock)[huangdijia/laravel-redis-ide-helper

Redis ide-helper for Laravel.

1243.3k](/packages/huangdijia-laravel-redis-ide-helper)

PHPackages © 2026

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