[ 
https://issues.apache.org/jira/browse/KAFKA-2397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14660279#comment-14660279
 ] 

Jay Kreps commented on KAFKA-2397:
----------------------------------

[~guozhang] Basically "session" would be the concept that ties a connection to 
the business logic layer. The session would be exposed with the request. I 
haven't thought through how this would work, but maybe in handleProduce you 
could do
   session.addOnClose("clear-produce-purgatory", => 
removeRequestFromPurgatory(id))
and in the purgatory when the request is completed you'd do
   session.removeOnClose("clear-produce-purgatory")

A similar mechanism would work based on the join-group request to rebalance the 
group on connection close.

Like I said, I didn't think this through and don't really advocate it. Like 
Jason I think there could be odd side effects.

> leave group request
> -------------------
>
>                 Key: KAFKA-2397
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2397
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: consumer
>            Reporter: Onur Karaman
>            Assignee: Onur Karaman
>            Priority: Minor
>             Fix For: 0.8.3
>
>
> Let's say every consumer in a group has session timeout s. Currently, if a 
> consumer leaves the group, the worst case time to stabilize the group is 2s 
> (s to detect the consumer failure + s for the rebalance window). If a 
> consumer instead can declare they are leaving the group, the worst case time 
> to stabilize the group would just be the s associated with the rebalance 
> window.
> This is a low priority optimization!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to