Add the ability of using prefixes in pubsub channel names - #121
Conversation
Multiple psrpc deployments sharing one redis instance collide on pubsub channel names (redis DB index only scopes the keyspace, not PUBLISH/SUBSCRIBE). WithChannelPrefix lets callers namespace every channel the redis bus uses. Also widens TestRPC's fixed RPC-readiness sleeps to reduce unrelated CI flakiness (a fan-out request occasionally firing before all 3 servers finished registering).
|
The tests fail but not caused by this PR: CI flake:
|
Hey,
the idea here is that I'm using FreeBSD where I have one Valkey instance that software uses. This module wasn't able to use prefixes for channels, which can lead to collisions, given I'd have more livekit deployments.
I'm already making changes to livekit itself to feature the prefix option, please merge this and update its dependency when able.
Next up I'll make a PR for livekit itself.