chia7712 commented on PR #17474:
URL: https://github.com/apache/kafka/pull/17474#issuecomment-2408775196

   @apoorvmittal10 Thanks for sharing. The disconnection listener seems like a 
good approach, but I’d like to have more discussion for my own understanding.
   
   > This might not solve the problem specified in 1 above. As when new client 
is created we should have a unique client instance id to determine uniquene 
instance. As the client metrics are tied to specific instance which is being 
created.
   
   I assume there are three scenarios for resending GET_TELEMETRY_SUBSCRIPTION:
   
        1.      The client is live but encounters a network issue, so it 
retries the request.
        2.      The client is restarted before completing the 
GET_TELEMETRY_SUBSCRIPTION.
        3.      The client is restarted after completing the 
GET_TELEMETRY_SUBSCRIPTION.
   
   The connection listener works well for handling cases 1 and 2, but case 3 
remains a problem, correct? In case 3, the connection listener isn’t triggered 
to remove the client from the cache, yet the user application will eventually 
create another client instance.
   
   If our goal is to avoid the cache filling up with ‘ghost’ clients, perhaps 
we could introduce prioritization in the cache. The priority of a client 
instance could be based on either the number of PUSH_TELEMETRY_REQUEST calls or 
its lifetime.
   
   WDYT?


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to