ERROR org.apache.kafka.common.errors.InvalidReplicationFactorException: replication factor: 3 larger

Two solutions:

1. Mention zookeeper chroot directory while creating topic as follows (in my case chroot is /kafka)

kafka-topics --zookeeper :2181/kafka --create --topic first --partitions 1 --replication-factor 1

 

2. change zookeeper chroot to / using CM

   cluster>kafka>configuration: zookeeper.chroot

你可能感兴趣的:(kafka)