Console commands
This adds ConsoleProducer/Consumer classes and 3 simple scripts for producing, consuming, and creating topics. This can be useful for testing and checking the state of things in kafka.
These commands are minimal right now, but more options/features can be added in the future.
How to use:
$ kp_create_topic -b 127.0.0.1:9092 -t "hello"
$ kp_producer -b 127.0.0.1:9092 -t "hello"
yo dude
what's up?
# Meanwhile, in another terminal...
$ kp_consumer -b 127.0.0.1:9092 -t "hello" -g "analytics"
yo dude
what's up?
I need to make some changes to make the options required options. Please don't merge yet
Ok, added support for required arguments and renamed _command_utils.py to _script_utils.py.
I think this is a great idea but this no longer merges cleanly. I think we may want to build this in a slightly different way as well. I'll work on a PR as a brain dump to show you what I'm thinking.
This is pretty old and the Kafka world has moved on a bit. At this point, I think this should PR should be rejected in favor of a combination of using Kafka's pre-packaged CLI scripts + adding an AdminClient interface to kafka-python (https://github.com/dpkp/kafka-python/issues/935).
perhaps. but omar was a close friend who passed away and I have a hard time closing this for personal reasons.
I'm sorry for your loss.
Peace brother - merged #2560 w/ console interfaces.