Yes. And as you can see in that function, when no key is specified, it
chooses a partition for each message in a round-robin manner, while we want
to make all the messages in the same batch with the same topic to be sent
to one partition.

So if the message is the first seen with the topic in the batch, we can
choose one partition, but we want to stick to that partition with all the
rest messages with the same topic in this batch.

Guozhang


On Wed, Jul 3, 2013 at 11:18 AM, S Ahmed <sahmed1...@gmail.com> wrote:

>
> https://github.com/apache/kafka/blob/0.8/core/src/main/scala/kafka/producer/async/DefaultEventHandler.scala#L152
>
>
>
> On Wed, Jul 3, 2013 at 2:18 PM, S Ahmed <sahmed1...@gmail.com> wrote:
>
> > Jun,
> >
> > Looks like the update would happen around here?
> >
> >
> >
> >
> > On Wed, Jul 3, 2013 at 12:53 PM, Jun Rao <jun...@gmail.com> wrote:
> >
> >> Sam,
> >>
> >> Interested in taking a look at
> >> KAFKA-959<https://issues.apache.org/jira/browse/KAFKA-959>
> >> ?
> >>
> >> Thanks,
> >>
> >> Jun
> >>
> >>
> >> On Sun, Jun 23, 2013 at 11:01 PM, Sam Meder <sam.me...@jivesoftware.com
> >> >wrote:
> >>
> >> > Hey,
> >> >
> >> > I now have roughly a day a week I can dedicate to working on Kafka,
> so I
> >> > am looking for issues in the 0.8.1 batch that you think might be good
> >> > starting points. Input would be much appreciated.
> >> >
> >> > Speaking of issues, I think it would be good to either fix
> >> > https://issues.apache.org/jira/browse/KAFKA-946 for 0.8 or just drop
> >> the
> >> > code from the release.
> >> >
> >> > /Sam
> >>
> >
> >
>



-- 
-- Guozhang

Reply via email to