Yes, our consumer iterator returns MessageAndMetadata. You can do consumerIterator.next().key() to get the key.
Thanks, Jun On Thu, May 9, 2013 at 7:44 AM, Yu, Libo <libo...@citi.com> 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 > >