Skip to content

Latest commit

 

History

History
13 lines (12 loc) · 719 Bytes

create_topic.md

File metadata and controls

13 lines (12 loc) · 719 Bytes

Create Kafka Topic Examples

bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --topic learning.apache.kafka --partitions 1 --replication-factor 1 
bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --topic learning.spring.kafka.json --partitions 3 --replication-factor 1
bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --topic employee.topic --partitions 3 --replication-factor 1
bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --topic course.topic  --partitions 3 --replication-factor 1

Alter Kafka Topic

bin/kafka-topics.sh --bootstrap-server localhost:9092 --alter --topic my-first-topic \
      --partitions 2