-
Notifications
You must be signed in to change notification settings - Fork 207
Open
Labels
Description
Echo Version
2.2.0
Laravel Version
12.25.0
PHP Version
8.4.11
NPM Version
PNPM 10.15.0
Database Driver & Version
No response
Description
I tried setting up broadcasting with Ably according to the docs: https://laravel.com/docs/12.x/broadcasting.#client-ably. After following all steps and debugging, I concluded that Laravel ably driver is incompatible with Echo.
The problem is:
- Laravel
ablydriver broadcasts toprivate:broadcast(colon). laravel-echolibrary subscribes toprivate-broadcast(hyphen).
In order to fix this, Echo should use colons when subscribing to Ably. For the purpose of confirming that this approach would work, I edited PusherConnector in Echo source locally. I replaced colons to hyphens and Echo started working as expected.
Steps To Reproduce
- Follow Laravel docs to setup broadcasting with Ably.
- Setup basic front-end for testing.
- Run the queue using
sail artisan queue:workor similar. - Set
Pusher.logToConsole = true;. - Test using the front-end. You will see that Ably does not return anything.
- Check front-end logs in the console. The subscribed endpoint uses a hyphen.
- Check Ably dev console using their web client. Laravel uses a colon to broadcast with
BROADCAST_CONNECTION=ably.