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 <mkathu...@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