You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/14 01:37:28 UTC

[GitHub] [pulsar] zengguan opened a new issue, #17625: PIP-207

zengguan opened a new issue, #17625:
URL: https://github.com/apache/pulsar/issues/17625

   ### Motivation
   
   ### Motivation
   
   Add a new api named clientStats to proxy stats. After the producer or consumer is created, we can find some client stats like topic or producer name/subscription name。This is useful for knowing which topic the client is connecting to.
   
   ```json
   {
       "/127.0.0.1:58774":{
           "channelId":"b5b8e701",
           "type":"producer",
           "clientId":0,
           "clientName":"client01",
           "createTime":"2022-09-13 11:40:56",
           "topic":"persistent://pulsar/default/test-topic-partition-0"
       },
       "/127.0.0.1:58775":{
           "channelId":"bcd86c75",
           "type":"producer",
           "clientId":1,
           "clientName":"client01",
           "createTime":"2022-09-13 11:40:56",
           "topic":"persistent://pulsar/default/test-topic-partition-1"
       }
   }
   
   ```
   
   clientName is producerName/subscriptionName
   
   ### Goal
   
   With the increase of the number of clients, it becomes unclear or even difficult to get the client associated with the topic. Therefore, it is hoped that there is an api that can obtain the relevant information of the client, and can know the associated client information when the topic changes.
   
   ### API Changes
   
   Add a new api named clientStats to proxy stats.
   ```
       @GET
       @Path("/clients")
       @ApiOperation(value = "Proxy stats api to get info for clients",
               response = Map.class, responseContainer = "Map")
       @ApiResponses(value = { @ApiResponse(code = 412, message = "Proxy logging should be > 0 to capture client stats"),
               @ApiResponse(code = 503, message = "Proxy service is not initialized") })
       public Map<String, ClientStats> clients() {
           return proxyService().getClientStats();
       }
   ```
   
   ### Implementation
   
   
   Added a new `ClientStats` class. This class return some client stats  like `producerName/subscriptionName`. When we process a create producer request or create a subscribe request, we add client stats to the map. If the connection is closed, we remove client stats from the map.
   
   ### Alternatives
   
   _No response_
   
   ### Anything else?
   
   _No response_


-- 
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-unsubscribe@pulsar.apache.org.apache.org

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


[GitHub] [pulsar] zengguan commented on issue #17625: [feature][proxy][PIP-207] Add clientStats API for ProxyStats

Posted by GitBox <gi...@apache.org>.
zengguan commented on issue #17625:
URL: https://github.com/apache/pulsar/issues/17625#issuecomment-1246179003

   > Split `clientName` to `producerName` and `subscriptionName` would be great.
   
   thanks, I have split it


-- 
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-unsubscribe@pulsar.apache.org

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


[GitHub] [pulsar] liangyuanpeng commented on issue #17625: [feature][proxy][PIP-207] Add clientStats API for ProxyStats

Posted by GitBox <gi...@apache.org>.
liangyuanpeng commented on issue #17625:
URL: https://github.com/apache/pulsar/issues/17625#issuecomment-1246147498

   Split `clientName` to `producerName`  and `subscriptionName` would be great.


-- 
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-unsubscribe@pulsar.apache.org

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


[GitHub] [pulsar] zengguan commented on issue #17625: [feature][proxy][PIP-207] Add clientStats API for ProxyStats

Posted by GitBox <gi...@apache.org>.
zengguan commented on issue #17625:
URL: https://github.com/apache/pulsar/issues/17625#issuecomment-1246200941

   PIP discuss thread : https://lists.apache.org/thread/d8508p9lz80ggzsgd8fxctk8o5h7y38b
   
   Please ignore the error json format in the email


-- 
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-unsubscribe@pulsar.apache.org

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


[GitHub] [pulsar] github-actions[bot] commented on issue #17625: PIP-207: Add clientStats API for ProxyStats

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #17625:
URL: https://github.com/apache/pulsar/issues/17625#issuecomment-1279873498

   The issue had no activity for 30 days, mark with Stale label.


-- 
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-unsubscribe@pulsar.apache.org

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