Skip to content

Trouble producing if too many brokers are down #115

@Ben-M

Description

@Ben-M

I was experimenting with different failure conditions and found that if I shut down two of five Kafka brokers poseidon would often fail to produce, and instead responded with "Failed to send all messages". More details:

  • I ran zookeeper and 5 Kafka brokers locally (more or less as described here).
  • I created a topic with 5 partitions and a replication factor of 3:
    bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 3 --partitions 3 --topic 3
  • I killed two of the brokers using an interrupt signal, and allowed time for the brokers to rebalance.
  • I attempted to produce:
producer = Poseidon::Producer.new(["127.0.0.1:9091", "127.0.0.1:9092", "127.0.0.1:9093", "127.0.0.1:9094", "127.0.0.1:9095"], "my_test_producer", {required_acks: 0 })
  messages = [Poseidon::MessageToSend.new('3', "value1")]
  producer.send_messages(messages)
  • I saw a RuntimeError with the message 'Failed to send all messages'

For certain combinations of brokers being down I was able to produce, for other combinations I was not able to produce.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions