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

Fixed bug that RedisAdapter::mixSubscribe cannot work cased by redis prefix. #4892

Merged
merged 7 commits into from Jul 2, 2022

Conversation

@huangdijia
Copy link
Member

这会造成 BC?

@limingxinleo
Copy link
Member

@huangdijia 确实有问题。。这里 publish 用的是 \Redis ,有前缀

但是订阅用的是 mix/Subscriber 没有前缀

@limingxinleo limingxinleo changed the title 使用 Subscriber 订阅时,频道名称不会被携带配置文件中的前缀,需要手动拼接 Fixed bug that RedisAdapter::mixSubscribe cannot work cased by redis prefix. Jul 2, 2022
@limingxinleo limingxinleo merged commit 73a8058 into hyperf:master Jul 2, 2022
@huangdijia
Copy link
Member

protected function getChannelKey(): string
    {
        return join(':', [
            $this->redisPrefix,
            $this->nsp->getNamespace(),
            'channel',
        ]);
    }

这里已经拼接了前缀吧

@limingxinleo
Copy link
Member

这个前缀是这个类设置的前缀

还有个,Redis 级别的配置前缀

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

Successfully merging this pull request may close these issues.

None yet

3 participants