Skip to content

Conversation

@oneby-wang
Copy link
Contributor

@oneby-wang oneby-wang commented Sep 8, 2025

Motivation

MQTTConsumer appId field is equivalent to the userRole in Authentication. The appId field will be used to do checkPermissionsAsync when namespace policies update.
https://github.com/apache/pulsar/blob/0a949de4bfa3734194be87a8655763a4411be1b6/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java#L1042-L1044

Modifications

Before: appId is set to ""
After: appId is set to connection.getUserRole()

Verifying this change

  • Make sure that the change passes the CI checks.

Documentation

Check the box below.

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    (Please explain why)

  • doc

    (If this PR contains doc changes)

@github-actions
Copy link

github-actions bot commented Sep 8, 2025

@oneby-wang:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@oneby-wang oneby-wang changed the title Fix mqtt disconnect due to appId permission bug when namespace polici… Fix mqtt disconnect due to appId permission bug when namespace policies update Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant