Versions Compared

Key

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

...

e.g kafka-console-producer.sh --brokerbootstrap-list localhostserver `hostname`:9092 --topic my_topic < my_filetest-01 < 1.txt (Only supports reading a single file)

Or use a more complex shell to enter the contents of multiple files into kafka.

As far as user habits are concerned, when encountering such problems, they always ask Kafka whether it supports such use at the first time, and then look for other alternative solutions.

If the application layer of the kafka producer command line tool supports reading multi-file data, it will be more convenient for users.

...

The current implementation scheme is not complicated, it does not have much difference with Line MessageReader, but in order to distinguish it from Line, I extracted FileMessageReader.

MessageReader

...

.

...

languagescala
titleMessageReader

...


FileMessageReader

...

...

languagescala
titleFileMessageReader

...

FileMessageReader will be used to detect the availability of the input file list and read multiple files.

Compatibility, Deprecation, and Migration Plan

...