laravel / reverb

Laravel Reverb provides a real-time WebSocket communication backend for Laravel applications.
https://reverb.laravel.com
MIT License
1.05k stars 76 forks source link

Allow choosing redis connection #126

Closed qlereboursBS closed 5 months ago

qlereboursBS commented 5 months ago

Objective

Allow to use another redis connection than the default one.

Why

Sometimes you don't have a default redis connection, or at least it doesn't contain the host and port keys, if you're using sentinel for instance. While awaiting for the sentinel support, a great comprise can be to let us customise which redis connection is used for the websockets.

How

  1. In \Laravel\Reverb\Servers\Reverb\Publishing\RedisPubSubProvider::redisUrl function, use a configuration option to know which connection to use, or use the default one as a fallback.
  2. Update the documentation
driesvints commented 5 months ago

Heya, could you attempt a PR so we can have a look? thanks!