Start the 2 servers
>bin/kafka-server-start.sh config/server1.properties
>bin/kafka-server-start.sh config/server2.properties
Create a Topic on the Cluster
>/opt/kafka$ bin/kafka-topics.sh --create --zookeeper ubuntu-client1:2181,ubuntu-client2:2181,ubuntu-client3:2181 --replication-factor 2 --partitions 2 --topic cluster1
Open the producer Console
>bin/kafka-console-producer.sh --broker-list ubuntu-client1:9092,ubuntu-client1:9093 --topic cluster1
Open the consumer Console to display the message
>bin/kafka-console-consumer.sh --zookeeper ubuntu-client1:2181,ubuntu-client2:2181,ubuntu-client3:2181 --topic cluster1 --from-beginning
3. Run multiple brokers on multiple machines
broker id should be unique, port number should be different on the same machine, so the log dir. That is it.