trepatudo / laravel-redisreliable by trepatudo

Redis broadcast driver with reliable delivery
444
6
2
Package Data
Maintainer Username: trepatudo
Maintainer Contact: dev@marcosilva.pt (Marco Silva)
Package Create Date: 2016-03-15
Package Last Update: 2016-03-16
Language: PHP
License: MIT
Last Refreshed: 2024-11-11 15:23:23
Package Statistics
Total Downloads: 444
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 6
Total Watchers: 2
Total Forks: 1
Total Open Issues: 1

Laravel Redis Reliable Broadcasting Driver

Same as RedisBroadcaster from illuminate/broadcasting but allows a customization to assure at least 1 subscriber has received the event, otherwise adds it into a list.

Requirements

  • laravel >= 5.1

Installation

Using Composer:

composer require trepatudo/laravel-redisreliable

In your config/app.php file add the following provider to your service providers array:

'providers' => [
    ...
    RedisReliableDriver\RedisReliableBroadcastServiceProvider::class,
    ...
]

In your config/broadcasting.php file set the default driver to 'redisreliable' and add the connection configuration like so:

'default' => 'redisreliable',

'connections' => [
    ...
    'redisreliable' => [
      'driver' => 'redisreliable',
      'connection' => 'default',
      'sub_min'     => env('BROADCAST_REDISRELIABLE_MIN', 1), // Minimum subscribers required to get the broadcast (pub/sub) 
      'sub_list'   => env('BROADCAST_REDISRELIABLE_LIST', 'laravel_rr_list'), // List to add the broadcast payload and channel in case sub_min was not matched
    ],
    ...
]