# Kafka Output - Node Failover

**URL:** <https://discuss.elastic.co/t/kafka-output-node-failover/181038>\
**Category:** Logstash\
**Created:** [May 14, 2019, 4:13pm UTC](https://discuss.elastic.co/t/kafka-output-node-failover/181038 "2019-05-14T16:13:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![oats\_gal](https://avatars.discourse-cdn.com/v4/letter/o/3d9bf3/32.png) [@oats\_gal](https://discuss.elastic.co/u/oats_gal)\
**Post date:** [May 14, 2019, 4:13pm UTC](https://discuss.elastic.co/t/kafka-output-node-failover/181038/1 "2019-05-14T16:13:05Z")

</div>

I've seen a few similar notes on this topic, but haven't had any success in finding a solution as of yet.

We have Logstash 6.6.0 processes that run on all of our VMs and send their logs to Kafka, specifically a Kafka VIP that has 10 Kafka brokers behind it. I've noticed that when a Kafka broker is down, either intentionally or not, whatever Logstash process that was talking to it enters a loop of retries and will not connect again until a restart of the process forces the rebalance. The kafka input plugin has a useful session\_timeout\_ms that forces a rebalance, but I haven't had any luck finding something similar for the kafka output plugin.

This repeats in the logs when the broker is pulled:

> [2019-05-14T15:56:29,326][WARN][org.apache.kafka.clients.NetworkClient] [Producer clientId=producer-1] Connection to node 1 (\<broker\_name\>) could not be established. Broker may not be available.

Current configuration of the processes's output:

> ```
> output {
> kafka {
> bootstrap_servers => "<kafka_vip>:9092"
> topic_id => "${OUTPUT_TOPIC}"
> compression_type => "lz4"
> message_key => "%{timestamphashkey}"
> acks => "1"
> batch_size => 5000
> codec => "json"
> }
> }
> 
> ```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 11, 2019, 4:13pm UTC](https://discuss.elastic.co/t/kafka-output-node-failover/181038/2 "2019-06-11T16:13:17Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
