I am using Kafka 0.10.0.0, in a cluster with 3 nodes
I have auto topic creation enabled on brokers and on all brokers I have added properties for specify number of partition and replicas
num.partitions=2
default.replication.factor=2
Now when I am querying topic description via command line, I am getting unexpected results. Sometimes its showing 1 partition for this topic and sometimes 2 partitions for this topic.
bin/kafka-topics.sh --describe --zookeeper IP1:2181,IP2:2181,IP3:2181 --topic T.topic1_
Topic:T.topic1 PartitionCount:1 ReplicationFactor:2 Configs:
Topic: T.topic1 Partition: 0 Leader: 2 Replicas: 2,3 Isr: 2
bin/kafka-topics.sh --describe --zookeeper IP1:2181,IP2:2181,IP3:2181 --topic T.topic1
Topic:T.topic1 PartitionCount:2 ReplicationFactor:2 Configs:
Topic: T.topic1 Partition: 0 Leader: 3 Replicas: 3,0 Isr: 0,3
Topic: T.topic1 Partition: 1 Leader: 0 Replicas: 0,2 Isr: 2,0
Am I querying incorrectly since when its showing 1 partition its showing replicas 2 but ISR only 1
Also, the consumer group for this topic is always showing that consumer is listening on 2 partitions bin/kafka-consumer-groups.sh --new-consumer --bootstrap-server IP1:9092,IP2:9092,IP3:9092 --describe --group Group1
GROUP TOPIC PARTITION CURRENT-OFFSET LOG-END-OFFSET LAG OWNER
Group1 topic1 0 5 5 0 consumer-58_/10.20.1.20
Group1 topic1 1 3 3 0 consumer-58_/10.20.1.20
Also, specifying my broker configurations : -- zookeeper.properties
zookeeper.server=IP1:2181,IP2:2181,IP3:2181 (not sure need to give all ZK servers)
-- server.properties
num.partitions=2
default.replication.factor=2
zookeeper.connect=IP1:2181,IP2:2181,IP3:2181
Note : Zookeeper and Kafka are running on all IP1,IP2,IP3 servers