-
Notifications
You must be signed in to change notification settings - Fork 471
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
Pub/Sub doesn't take namespace into account #952
Comments
Good Catch. It seems that the reason for the problem is that the namespace information in |
I'm also wondering if any users need this feature |
I think this is ok, so does redis. |
Yes, this behavior is matched the Redis if we regard the namespace as the Redis DB. So I'm wondering if any users need this feature. |
If someone needs this feature, I think they can just use stream. |
There's a bit different between stream and pubsub. For the stream, it likes most message queue system, all message can be saw before the retention ttl but the pubsub is fire and forget. |
Yes, I mean that if someone needs this feature, they can use stream instead in the current situation. In fact, many people who directly use Redis also use stream instead of pubsub to avoid the disadvantages of pubsub. I think it is enough for kvrocks to align with Redis. |
Search before asking
Version
Latest from the
unstable
branch, Fedora 35.Minimal reproduce step
Run
kvrocks
with additional two namespaces, e.g.Run two
redisc-cli
instances, and connect tokvrocks
.Switch to the first namespace via the first
redis-cli
:auth password4one
.Switch to the second namespace via the second
redis-cli
:auth password4two
.Execute
subscribe channel
via the secondredisc-cli
.Execute
publish channel not-for-second-ns
via the firstredis-cli
.What did you expect to see?
The message, published in
namespace.one
should not be received by the subscribers innamespace.two
, even if the channel names are the same.What did you see instead?
Subscribers from
namespace.two
received the message, published innamespace.one
.For Pub/Sub namespaces aren't isolated.
Anything Else?
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: