psarna/seastar

Write standalone command-line demo client for kafka_producer

Opened this issue · 0 comments

It is needed to create a command-line seastar program that reads data from the standard input line by line and uses kafka_producer to send this data to Kafka.

It should take 2 command-line arguments:

  1. ip of a Kafka node that will be a seed node for the client
  2. topic name the producer will be sending data to

The program should do the following things in order:

  1. Create an instance of kafka_producer
  2. Create an instance of kafka_producer::properties. For now it needs only bootstrap.servers value.
  3. Init kafka_producer with init method that takes kafka_producer::properties.
  4. In the loop: read two lines from standard input (key and value), use kafka_producer::send to send them to Kafka
  5. Finish when there's end of input.