-
Notifications
You must be signed in to change notification settings - Fork 130
Remove re-subscription logic in scaling mode #346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This logic was originally introduced in laravel#251 due to the use of createLazyClient(). Since it was replaced with createClient() in laravel#281, it is no longer needed.
Thanks @ashiquzzaman33. I understand it's no longer required when using createClient, but is there any reason not to have it in there in case an unsubscribe event is emitted? When using Redis for horizontal scaling, I can't think of a reason why you wouldn't want to ensure the subscription is established. |
Thanks @joedixon ! 🙌 |
Also in RedisSubscribeClient.php , the |
The call to "subscribe" with the channel definitely looks like a bug so we'll get that fixed, but I still wonder about removing the "unsubscribe" listener. In the context of Reverb, when would you want to intentionally unsubscribe? I would argue we want to ensure the connection stays established at all costs. |
You're right that we want to keep the connection established, and in the context of Reverb I can’t imagine a case where we’d intentionally unsubscribe. Since we never call unsubscribe, that event will never fire—connection loss triggers |
Hi @joedixon !
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you this code is no longer necessary. Thanks for the contribution.
This logic was originally introduced in #251 due to the use of createLazyClient(). Since it was replaced with createClient() in #281, it is no longer needed.