Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Kafka, mail # user - Re: key used by producer


+
Jun Rao 2013-05-09, 15:04
Copy link to this message
-
Re: key used by producer
David Arthur 2013-05-09, 15:05
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
>
>
 
+
Jun Rao 2013-05-13, 16:27