Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 690 Bytes

3.brokers.md

File metadata and controls

23 lines (15 loc) · 690 Bytes

If we want to create more brokers:

How to create more brokers

  1. cp server.properties server1.properties

  2. Edit the file and search "broker.id" and put = 1

  3. Search "listeners=PLAINTEXT" and put: listeners=PLAINTEXT://localhost:9092 , every broker have to have different port

  4. Search "log.dirs" and put: log.dirs=/tmp/kafka_1-logs

Then run bin/kafka-server-start.sh config/server.properties bin/kafka-server-start.sh config/server1.properties bin/kafka-server-start.sh config/server2.properties

etc

Check brokers running

bin/zookeeper-shell.sh localhost:2181 ls /brokers/ids