Write standalone command-line demo client for kafka_producer
Opened this issue · 0 comments
haaawk commented
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:
- ip of a Kafka node that will be a seed node for the client
- topic name the producer will be sending data to
The program should do the following things in order:
- Create an instance of kafka_producer
- Create an instance of kafka_producer::properties. For now it needs only bootstrap.servers value.
- Init kafka_producer with init method that takes kafka_producer::properties.
- In the loop: read two lines from standard input (key and value), use kafka_producer::send to send them to Kafka
- Finish when there's end of input.