kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Liquan Pei <liquan...@gmail.com>
Subject Re: Does kafka write key to broker?
Date Tue, 23 Jun 2015 17:04:16 GMT
Hi Mohit,

If you instantiate the keyed message with
val topic = "topic"
val value = "value"
val message = new KeyedMessage[String, String](topic,  value);

Then the key in the KeyedMessage will be null.

Hope this helps!

Thanks,
Liquan

On Tue, Jun 23, 2015 at 8:18 AM, Mohit Kathuria <mkathuria@sprinklr.com>
wrote:

> Hi,
>
> We are using kafka 0.8.1.1 in our production cluster. I recently started
> specifying key as the message itself. I just realised that the key is also
> written to the broker which means that the data is duplicated within a
> keyed message. I am going to change the key. Stupid mistake.
>
> However, just out of anxiety, I want to know whether we can turn off
> writing the key to the broker. Any configuration I can change to achieve
> this?
>
> -Thanks,
> Mohit Kathuria
>



-- 
Liquan Pei
Department of Physics
University of Massachusetts Amherst

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