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

Jiangjie Qin commented on KAFKA-345:
------------------------------------

There are some other considerations regarding adding the callback to old 
consumer as well. First, it's a backward compatible patch, if user does not 
wire in the callback, there is no impact. So current user will not be affected. 
Secondly, it is not too complicated to add the callback and it might take some 
time for the new producer to be ready for production, hence it seems to worth 
making this available for the transitional period. I think it could also 
potentially provide some references for how the callback could be used in new 
producer. 

> Add a listener to ZookeeperConsumerConnector to get notified on rebalance 
> events
> --------------------------------------------------------------------------------
>
>                 Key: KAFKA-345
>                 URL: https://issues.apache.org/jira/browse/KAFKA-345
>             Project: Kafka
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.7, 0.8.0
>            Reporter: Peter Romianowski
>         Attachments: KAFKA-345.patch, KAFKA-345.patch
>
>
> A sample use-case
> In our scenario we partition events by userid and then apply these to some 
> kind of state machine, that modifies the actual state of a user. So events 
> trigger state transitions. In order to avoid the need of loading user's state 
> upon each event processed, we cache that. But if a user's partition is moved 
> to another consumer and then back to the previous consumer we have stale 
> caches and hell breaks loose. I guess the same kind of problem occurs in 
> other scenarios like counting numbers by user, too.



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

Reply via email to