The purpose of key in kafka

2014-12-19 Thread Rajiv Kurian
Hi all, I was wondering what why every ProducerRecord sent requires a serialized key. I am using kafka, to send opaque bytes and I am ending up creating garbage keys because I don't really have a good one. Thanks, Rajiv

Re: The purpose of key in kafka

2014-12-19 Thread Jiangjie Qin
Hi Rajiv, You can send messages without keys. Just provide null for key. Jiangjie (Becket) Qin On 12/19/14, 10:14 AM, Rajiv Kurian ra...@signalfuse.com wrote: Hi all, I was wondering what why every ProducerRecord sent requires a serialized key. I am using kafka, to send opaque bytes and I am

Re: The purpose of key in kafka

2014-12-19 Thread Rajiv Kurian
Thanks, didn't know that. On Fri, Dec 19, 2014 at 10:39 AM, Jiangjie Qin j...@linkedin.com.invalid wrote: Hi Rajiv, You can send messages without keys. Just provide null for key. Jiangjie (Becket) Qin On 12/19/14, 10:14 AM, Rajiv Kurian ra...@signalfuse.com wrote: Hi all, I was

Re: The purpose of key in kafka

2014-12-19 Thread Steve Miller
Also, if log.cleaner.enable is true in your broker config, that enables the log-compaction retention strategy. Then, for topics with the per-topic cleanup.policy=compact config parameter set, Kafka will scan the topic periodically, nuking old versions of the data with the same key. I