Skip to content
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

IRedisDatabase Publish & Subscribe Channel aren't included in Keyspace isolation #197

Closed
ejmarino opened this issue Sep 7, 2019 · 4 comments
Assignees

Comments

@ejmarino
Copy link

ejmarino commented Sep 7, 2019

I'm sharing Redis between different instances of the application, and every one of then must run independently one of each other.
Setting up a KeyPrefix at startup time i'm sure that the application code has no way of entering another keyspace and make a mess.
I was expecting that the same occurs with the pub/sub service of redis. I'd checked the code of RedisDatabase and the channel name I enter is passed to the multiplexer without prefixing the keyspace.

@ejmarino
Copy link
Author

ejmarino commented Sep 7, 2019

Looks like if you set redisConfiguration.ConfigurationOptions.ChannelPrefix = redisConf.KeyPrefix then you have your setup completely isolated within a keyprefix.
I Think this should be set by default. but this is my opinion.

@imperugo
Copy link
Owner

imperugo commented Oct 9, 2019

Hi @ejmarino
thanks for the question and the suggestion.
I'm going to plan a big refactor on that part and I'll cover your scenario in the next major.

I keep this issue open so you can see the progress.

Thanks

@imperugo
Copy link
Owner

Just pushed the v 6.0.5-pre that include the key prefix into the channel prefix.

See here https://github.com/imperugo/StackExchange.Redis.Extensions/blob/v6/src/core/StackExchange.Redis.Extensions.Core/Configuration/RedisConfiguration.cs#L251

On nuget in few minutes.

Going to close this issue. Let me know if you have problems.
Thanks

@ejmarino
Copy link
Author

Thanks! I'll check it out.

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

No branches or pull requests

2 participants