thetumbled commented on code in PR #22564:
URL: https://github.com/apache/pulsar/pull/22564#discussion_r1598211480


##########
pip/pip-347.md:
##########
@@ -0,0 +1,63 @@
+
+# PIP-347: add role field in consumer's stat
+
+# Background knowledge
+
+During the operation and maintenance process, there are many users asking 
administrator for help to find out the consumers of a topic and notify them 
about the business change.
+Administrators can call `bin/pulsar-admin topics partitioned-stats` to find 
out the `ip:port` of the consumers, but no role info. So administrators need to 
take a lot of time to
+communicate with users to find out the owner based on the `ip:port`. It's a 
troublesome work and low efficiency.
+
+# Motivation
+
+This pip can help to solve such kind of problem. By adding a field `role` in 
the consumer's stat, the administrator can find out the owner of the consumer 
directly. 
+It can save a lot of time and improve the efficiency of the operation and 
maintenance process.

Review Comment:
   In our cases, we can't trace back a consumer by subscription name, the 
consumer name and the properties. For an subscription bypassing out management 
platform, there is no way for us to find out the owner for now.
   
   As the field name `role` is a little confused since the Pulsar's access 
control is not role based. We can rename the field exposed to `appId`, as 
`appId` is one of the property of the consumer object. For JWT-based 
authentication users, we can use `appId` to retrieve the role info of the 
consumer.
   
https://github.com/apache/pulsar/blob/854a0560eb77174d7207dafc344b242ae6f92b9f/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java#L203-L203



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to