kvrocks icon indicating copy to clipboard operation
kvrocks copied to clipboard

Support namespace in Pub/Sub commands

Open PragmaTwice opened this issue 1 year ago • 2 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

Motivation

Currently the namespace mechanism is not supported by Pub/Sub series commands.

Actually it may be not hard to support by using concurrent containers in TBB.

Solution

No response

Are you willing to submit a PR?

  • [ ] I'm willing to submit a PR!

PragmaTwice avatar Feb 10 '24 13:02 PragmaTwice

According to the redis docs( https://redis.io/docs/interact/pubsub/ ), the Pub/Sub command in redis is not related to the database numbers.

Pub/Sub has no relation to the key space. It was made to not interfere with it on any level, including database numbers. Publishing on db 10, will be heard by a subscriber on db 1.

It seems that the namespace mechanism in kvrocks has similar purpose as the database numbers in redis, so if we want the commands to be consistent with redis, will it be better if we just keep using current implementation?

JxLi0921 avatar Feb 13 '24 09:02 JxLi0921

Do you still think this feat should be implemented? I think what @JxLi0921 said makes sense. But if you think this is valuable, please assign it to me. I am willing to have a try as my first issue.

Chiro11 avatar Apr 03 '24 06:04 Chiro11