kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Arthur <mum...@gmail.com>
Subject Re: key used by producer
Date Thu, 09 May 2013 15:05:26 GMT
Yes, I'm pretty sure keys are now retained with the message and returned 
in the consumer.

In the Java/Scala client, ConsumerIterator returns a MessageAndMetadata 
which includes key, message, topic, partition, and offset

-David

On 5/9/13 10:44 AM, Yu, Libo wrote:
> Hi,
>
> I am looking at the example producer code for kafka 0.8.
> I notice it is possible to specify a key when creating
> KeyedMessage. This key will be used for assigning the
> message to some partition. I wonder if the key will be
> received by the consumer. Thanks.
>
>
> Libo
>
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message