kafka.producer.Partitioner Jun
On Fri, Dec 2, 2011 at 9:41 PM, Mark <static.void....@gmail.com> wrote: > 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....@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? >>> >>> >>>