kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Romianowski (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-345) Add a listener to ZookeeperConsumerConnector to get notified on rebalance events
Date Sun, 03 Jun 2012 15:23:23 GMT

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

Peter Romianowski commented on KAFKA-345:
-----------------------------------------

Jun,

regarding your comments:

1. Adding it to the scala-version makes sense, of course. Bear with me, I'm just a Java-guy.
I'll add that.

2. I'll move the listener. I did name it "ConsumerListener" and "setListener" intentionally,
because I thought it would be a good extension point for future stuff, that is not necessarily
related to rebalancing. That's also why I made it an abstract class and not an interface.
If you still think it should be renamed, I'll do it.

3. I'll remove the spaces and unused imports.
                
> 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
>            Reporter: Peter Romianowski
>         Attachments: 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message