I am trying to create topics in Kafka by following the guide on cloudera -apache Kafka through command line. While running the command:
/usr/bin/kafka-topics --create --zookeeper hostname:2181/kafka --replication-factor 2
--partitions 4 --topic topicname
I get the below errors as follows:
Error while executing topic command replication factor: 1 larger than available
kafka.admin.AdminOperationException: replication factor: 1 larger than available
Could you someone please help me how to fix this error?