kcat icon indicating copy to clipboard operation
kcat copied to clipboard

Topic Admin API

Open vincentbernat opened this issue 9 years ago • 8 comments

Hi!

Would it make sense for kafkacat to be able to create/delete topics?

vincentbernat avatar Jan 21 '15 20:01 vincentbernat

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

edenhill avatar Jan 21 '15 21:01 edenhill

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.

clescot avatar Dec 04 '16 00:12 clescot

Hi, is there a plan for this item to be done?

repl-samuel avatar Dec 19 '17 23:12 repl-samuel

Underlying KIP-4 support in librdkafka is scheduled for Q1, kafkacat integration will follow shortly after.

edenhill avatar Jan 02 '18 17:01 edenhill

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)

edenhill avatar May 04 '18 14:05 edenhill

Any progress?

MartinX3 avatar Aug 08 '18 15:08 MartinX3

Has this been implemented in the meantime @edenhill ? I couldn't see anything in the docs.

AntonOfTheWoods avatar Mar 10 '21 03:03 AntonOfTheWoods

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.

juvenn avatar Jul 07 '23 03:07 juvenn