kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark <static.void....@gmail.com>
Subject Re: Partitioning
Date Sat, 03 Dec 2011 05:41:05 GMT
Can you point me to that class?

On 12/2/11 6:04 PM, Neha Narkhede wrote:
>>> Are producers responsible for determining which partition to write to or
> is this handled by the broker?
>
> This decision happens on the producer.
>
>>> If its not automatically handled by the broker, how do people usually go
> about deciding which partition to write to.. simple hashing?
>
> The following describes the default behavior -
>
> If you provide a key, it selects using hash(key)%num_partitions. If you
> don't provide a key, it simply defaults to random partition on a random
> broker.
>
> If you also plug in your custom partitioner to the producer.
>
> Thanks,
> Neha
>
> On Fri, Dec 2, 2011 at 5:58 PM, Mark<static.void.dev@gmail.com>  wrote:
>
>> Are producers responsible for determining which partition to write to or
>> is this handled by the broker?
>>
>> If its not automatically handled by the broker, how do people usually go
>> about deciding which partition to write to.. simple hashing?
>>
>>

Mime
View raw message