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

在使用正则订阅的时候提示没有权限 #302

Open
a11enhuang opened this issue Nov 24, 2023 · 0 comments
Open

在使用正则订阅的时候提示没有权限 #302

a11enhuang opened this issue Nov 24, 2023 · 0 comments

Comments

@a11enhuang
Copy link

我在我的项目中添加了依赖:

pulsar = "6.1.0"

然后尝试使用正则表达式的方式订阅消息

self.client.consumer()
    .with_subscription(subscription_name)
    .with_subscription_type(option.sub_type.unwrap_or(pulsar::SubType::Shared))
    .replace_topic(topic_regex)
    .with_subscription_type(pulsar::SubType::Exclusive)
    .with_options(ConsumerOptions::default().durable(false));

但是我会收到错误:

called `Result::unwrap()` on an `Err` value: Connection(PulsarError(Some(AuthorizationError), Some("Proxy Client is not authorized to GetTopicsOfNamespace")))
stack backtrace:

为什么会收到这个错误?是哪里没有正确的配置的原因吗?但是使用非正则订阅却是正常的,能正常订阅也能接收到消息。

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

No branches or pull requests

1 participant