kcat
kcat copied to clipboard
Topic Admin API
Hi!
Would it make sense for kafkacat to be able to create/delete topics?
Yes! And the Kafka core team is working on adding such support to the protocol so as soon as that is ready I will implement it in librdkafka/kafkacat aswell.
More info. https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Command+Line+and+Related+Improvements
Hi, for your information, kakfa 0.10.1.0 ships topic creation/removal feature in the protocol(kafka-2945 and kafka-2946). I hope kafkacat will ship soon this feature. :-) cheers, Charles.
Hi, is there a plan for this item to be done?
Underlying KIP-4 support in librdkafka is scheduled for Q1, kafkacat integration will follow shortly after.
CLI ideas:
Natural language syntax:
$ kafkacat -b mybroker -A <admin command>
where <admin command> is an expressive command tree, like:
CREATE TOPIC ( <name> [WITH] <num_parts> PARTITIONS AND] [ REPLICATION FACTOR <replf> | REPLICA ASSIGNMENT 0=1, 1=1, 2=5, 3=5 ]` [AND CONFIG key=value, key=value, ] ), ...
e.g.:
$ kafkacat -b mybroker -A create topic mytest with 3 partitions and a replication factor of 5, myothertopic with 2 partitions and replica assignment 0=1, 1=19, thirdtopic with 10 partitions and replication factor 2 and config compression.codec=producer
(this raises more questions than answers)
Any progress?
Has this been implemented in the meantime @edenhill ? I couldn't see anything in the docs.
kafkacat -b mybroker -A mytest,partitions=3,replicas=5,compression.codec=producer
Probably, we can reduce that to create one topic at a time, instead of many. And use k=v format, which will be both easier to read for human, and parse for machine.