-
Notifications
You must be signed in to change notification settings - Fork 0
/
kafka
17 lines (12 loc) · 814 Bytes
/
kafka
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
delete.topic.enable = true in config/server.properties
$> ./bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic my-topic --partitions 2 --replication-factor 1
Created topic "my-topic".
$> ./bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic my-topic
Topic:my-topic PartitionCount:2 ReplicationFactor:1 Configs:
Topic: my-topic Partition: 0 Leader: 0 Replicas: 0 Isr: 0
Topic: my-topic Partition: 1 Leader: 0 Replicas: 0 Isr: 0
$> ./bin/kafka-topics.sh --zookeeper localhost:2181 --delete --topic my-topic
Topic my-topic is marked for deletion.
Note: This will have no impact if delete.topic.enable is not set to true.
$> ./bin/kafka-topics.sh --zookeeper localhost:2181 --list
$> ./bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic my-topic