Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ConsoleProducer will be updated to accept a new property: parsenull.value. It will default to "true" to marker. By default, it will not be set to keep the existing behavior. When set to "false", the record value will be , if it's equal to the value entered, a record with the value set to null will be produced.

Example:

Code Block
languagebash
$ ./bin/kafka-console-producer.sh --bootstrap-server localhost:29092 --topic test --property parsenull.value=false --property parse.key=true
>mykey<tab>

...

marker=NULL
>NULL               (1)
>NULL more content  (2)

...

  1. This will result in a record with

...

  1. value=null.
  2. The record will have its value set to "NULL more content". The value has to exactly match the marker to be replaced by null.

Proposed Changes

Describe the new thing you want to do in appropriate detail. This may be fairly extensive and have large subsections of its own. Or it may be a few sentences. Use judgement based on the scope of the changeThis will require small changes in ConsoleProducer/LineMessageReader to accept the new flag and update the generated ProducerRecord accordingly.

Compatibility, Deprecation, and Migration Plan

  • What impact (if any) will there be on existing users?
  • If we are changing behavior how will we phase out the older behavior?
  • If we need special migration tools, describe them here.
  • When will we remove the existing behavior?

Rejected Alternatives

      This is backwards compatible as the new flag will not be set by default.


Rejected Alternatives

NoneIf there are alternative ways of accomplishing the same thing, what were they? The purpose of this section is to motivate why the design is the way it is and not some other way.