Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Redis keyPrefix does not work #562

Open
violarium opened this issue Mar 9, 2021 · 1 comment
Open

Redis keyPrefix does not work #562

violarium opened this issue Mar 9, 2021 · 1 comment

Comments

@violarium
Copy link

Redis prefix does nothing

laravel-echo-server version: 1.6.2

laravel-echo-server.json:

{
	"authHost": "http://localhost:8087",
	"authEndpoint": "/broadcasting/auth",
	"clients": [
	],
	"database": "redis",
	"databaseConfig": {
		"redis": {
			"port": "16378",
			"host": "localhost",
			"keyPrefix": "my-redis-prefix"
		},
		"sqlite": {
			"databasePath": "/database/laravel-echo-server.sqlite"
		}
	},
	"devMode": true,
	"host": null,
	"port": "6001",
	"protocol": "http",
	"socketio": {},
	"secureOptions": 67108864,
	"sslCertPath": "",
	"sslKeyPath": "",
	"sslCertChainPath": "",
	"sslPassphrase": "",
	"subscribers": {
		"http": true,
		"redis": true
	},
	"apiOriginAllow": {
		"allowCors": false,
		"allowOrigin": "",
		"allowMethods": "",
		"allowHeaders": ""
	}
}

Events still are:
Снимок экрана от 2021-03-09 14-14-10

@ManuDoni
Copy link

ManuDoni commented Apr 14, 2021

Hi, if you are still having the issue I can help because I had the same problem.
IMHO This depends on the Laravel configuration.

If don't have a Redis prefix isn't an issue for you, try to insert this in your Laravel .env file:

#leave REDIS_PREFIX empty but present or the laravel-echo client won't work
REDIS_PREFIX=

I removed the prefix because laravel-echo-client creates a channel string putting the prefix in the wrong place.
This causes a mismatch between the channel name used by the client and the one used by the server.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants