티스토리 뷰

공부

[Java] delete topic

승가비 2022. 1. 16. 20:52
728x90
public static void delete(String name) {
   AdminClient client = AdminClient.create(properties());
   DeleteTopicsResult deleteTopicsResult = client.deleteTopics(Collections.singletonList(name));

   while (!deleteTopicsResult.all().isDone()) {
   }
}

https://stackoverflow.com/questions/54140543/delete-topic-not-working-for-kafka-java-client-2-1-0/70729759#70729759

 

delete topic not working for kafka java client 2.1.0

I want to delete a kafka topic programatically and struggling a lot to make it work. Am using below maven dependency. <dependency> <groupId>org.apache.kafka</groupId>...

stackoverflow.com

 

728x90

'공부' 카테고리의 다른 글

[Tableau] 날짜 함수  (0) 2022.02.04
[Spark] write mode overwrite  (0) 2022.01.16
[IntelliJ] test coverage 80%  (0) 2022.01.16
[Kafka] configuration partition rebalancing  (0) 2022.01.16
[Java] MySQL get column name  (0) 2022.01.16
댓글