简体   繁体   中英

Programatically (JAVA) Create/Delete partition from Kafka Topic

On demand runtime, can I programatically (using java) Create/Delete partition from Kafka Topic

I am using Java Apache Kafka Client (0.10) and Apache Kafka installation (0.10)

Invoke AdminUtils.createTopic and AdminUtils.deleteTopic to create and delete topics respectively.

EDIT:

Use AdminUtils.addPartitions to add partitions for a topic. Kafka currently does not support to decrease the partition number.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM