kafka-python icon indicating copy to clipboard operation
kafka-python copied to clipboard

Console commands

Open rdiomar opened this issue 11 years ago • 6 comments

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?

This change is Reviewable

rdiomar avatar Feb 04 '14 22:02 rdiomar

I need to make some changes to make the options required options. Please don't merge yet

rdiomar avatar Feb 05 '14 00:02 rdiomar

Ok, added support for required arguments and renamed _command_utils.py to _script_utils.py.

rdiomar avatar Feb 05 '14 02:02 rdiomar

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.

sontek avatar Feb 11 '15 05:02 sontek

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).

jeffwidman avatar Jan 31 '17 23:01 jeffwidman

perhaps. but omar was a close friend who passed away and I have a hard time closing this for personal reasons.

dpkp avatar Feb 01 '17 00:02 dpkp

I'm sorry for your loss.

jeffwidman avatar Feb 02 '17 11:02 jeffwidman

Peace brother - merged #2560 w/ console interfaces.

dpkp avatar Jun 23 '25 22:06 dpkp