Leon created KAFKA-4191:

             Summary: After the leader broker is down, then start the producer 
of librdkafka, it cannot produce any data any more
                 Key: KAFKA-4191
                 URL: https://issues.apache.org/jira/browse/KAFKA-4191
             Project: Kafka
          Issue Type: Improvement
          Components: clients
    Affects Versions:
         Environment: Windows 7
            Reporter: Leon
            Priority: Minor

I am using kafka_2.11- and librdkafka-master on Windows 7,
and there are 3 brokers, 1 zookeeper, 1 producer (rdkafka_example.exe) and 1 
consumer(rdkafka_consumer_example_cpp.exe), All of them are on the same PC. 
But I found an issue that the producer failed to produce any data after the 
leader of the brokers is down.
Here are the steps to reproduce this issue:
1.  Start zookeeper.
2.  Start the brokers by running the following commands:
      kafka-server-start.bat .\config\server.properties
      kafka-server-start.bat .\config\server-1.properties
      kafka-server-start.bat .\config\server-2.properties

     The configures for each server are:



3. Create a new topic
      kafka-topics.bat --create --zookeeper localhost:2181 --replication-factor 
 3 --partitions 1 --topic topic1  
     Then you can see that the leader is broker 0 with following command
     kafka-topics.bat --describe --zookeeper localhost:2181 --topic topic1 

4. Start consumer:
      rdkafka_consumer_example_cpp.exe -g 1 -b localhost:9092 topic1 

5. Start producer:
      rdkafka_example.exe -P -t topic1 -b localhost:9092
 Now you can see that everything works fine.
6. Then stop broker0 by closing the command prompt which runs 
'kafka-server-start.bat .\config\server.properties', and you can see that the 
producer and consumer still work fine.

7. Then stop the producer and consumer by pressing Ctrl+C and then closing the 
related command prompt, and start them again with the same step 4 and 5, now 
you can see that both the producer and consumer do not work!
My expected behavior is that even the leader of multi-broker cluster is down, 
we still can start the producer and consumer of librdkafka.

Would you please give me any help?
Thank you!

This message was sent by Atlassian JIRA

Reply via email to