Serialization does happen before partitioning. There is no particular reason for this in the old producer since serialization and partitioning are independent. In the new producer, partitioning is based on hash of the serialized key. So partitioning has to be done after the serialization.
Thanks, Jun On Fri, Jan 16, 2015 at 10:57 AM, Liju John <lijubj...@gmail.com> wrote: > Hi , > > I have a general query - > > As per the code in Kafka producer the serialization happens before > partitioning , Is my understanding correct ? If yes whats the reason for it > ? > > Regards, > Liju John >