>> Does Kafka guarantee that a partition assigned to a consumer will stay at
this consumer for the whole lifetime of the jvm? Even in corner cases like
loosing connection to zookeeper?

No, it doesn't. In fact, the guarantee is that, the partition will be
assigned for consumption to another consumer if the previous one dies or
loses its zookeeper session.
The goal is to let the consumption of the topic, as a whole, continue
smoothly in the presence of individual consumer failures.

However, I'd like to understand your use case better. It seems that you
actually don't need any automatic rebalancing behavior in the consumer. Is
there a reason why you are not using SimpleConsumer instead ?

Thanks,
Neha


On Tue, May 1, 2012 at 3:28 PM, Peter Romianowski
<honkb...@googlemail.com>wrote:

> Hi,
>
> wer are using the high-level Java consumer. We feed the events received
> from Kafka into some sort of state machine. Since we have Kafka's guarantee
> that each partition is read by the same consumer, we want to keep the
> states in memory to achieve even higher throughput. So it is vital for us
> that either a partition is never moved from a running consumer or our code
> gets at least informed about that.
>
> Does Kafka guarantee that a partition assigned to a consumer will stay at
> this consumer for the whole lifetime of the jvm? Even in corner cases like
> loosing connection to zookeeper?
>
> Regards,
>
> Peter
>

Reply via email to