[Java] kafka create topic
public static void create(String name) {
AdminClient client = AdminClient.create(properties());
NewTopic topic = new NewTopic(
name,
(int)conf().get("partition"),
Short.parseShort(String.valueOf(conf().get("replication.factor"))));
client.createTopics(Collections.singleton(topic));
client.close();
}
Why is AdminClient not failing when creating a topic with Kafka cluster not running?
Why don't I get an error message when I run the following producer code and Kafka is not even running? I would expect the createTopics method to throw an exception, but it doesn't happen. Why? final
stackoverflow.com
How to configure kafka topic retention policy during creation with Spring?
I need to configure retention policy of a particular topic during creation. I tried to look for solution i could only find command level alter command as below ./bin/kafka-topics.sh --zookeeper
stackoverflow.com
How to create a Topic in Kafka through Java
I want to create a topic in Kafka (kafka_2.8.0-0.8.1.1) through java. It is working fine if I create a topic in command prompt, and If I push message through java api. But I want to create a topic
stackoverflow.com