# Logstash Kafka Output Plugin loss of events or delay in delivering events

**URL:** https://discuss.elastic.co/t/logstash-kafka-output-plugin-loss-of-events-or-delay-in-delivering-events/198035
**Category:** Logstash
**Created:** [September 4, 2019, 11:20am UTC](https://discuss.elastic.co/t/logstash-kafka-output-plugin-loss-of-events-or-delay-in-delivering-events/198035 "2019-09-04T11:20:01Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![giorgiogale](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@giorgiogale](https://discuss.elastic.co/u/giorgiogale)
#### Post date: [September 4, 2019, 11:20am UTC](https://discuss.elastic.co/t/logstash-kafka-output-plugin-loss-of-events-or-delay-in-delivering-events/198035/1 "2019-09-04T11:20:02Z")

</div>

Hi,

I have a problem sending events to cluster kafka.  
The events read in input from a file are not always received on the kafka cluster (  
it would seem only the first after the logstash process started).  
From the logstash logs I can see that the file is correctly detected, after that I don't see any log towards the kafka queue.  
I assume this is a logstash configuration problem, related to the configuration of the kafka cluster.

This is my logstash configuration file (Logstash version 7.1.1):

> input {
> 
> file {  
> path =\> "/dati/LOG\_ASCC\_DISP/ASCC\_DL\_\*"  
> start\_position =\> beginning  
> sincedb\_path =\> "/dev/null"  
> #type =\> "csv"  
> codec =\> multiline {  
> negate =\> true  
> pattern =\> "\[1\]{8}|"  
> what =\> "previous"  
> }  
> .  
> .  
> .  
> .  
> .  
> .  
> output {
> 
> kafka {  
> codec =\> json  
> topic\_id =\> "in.dispositivi"  
> acks =\> "1"  
> client\_id =\> "XXXXXXXXXXXX"  
> bootstrap\_servers =\> "ICDCOLCMA:9092"  
> security\_protocol =\> "SSL"  
> #ssl\_truststore\_location =\> "/home/logstash/logstash-7.1.1/config/certificati/logstash.server.truststore.jks"  
> #ssl\_truststore\_password =\> "xxxxxxxxxxx"  
> ssl\_truststore\_location =\> "/dati/logstash/logstash-7.1.1/keystore.jks"  
> ssl\_truststore\_password =\> "ICDCOLCMA"  
> #ssl\_keystore\_location =\> "/home/logstash/logstash-7.1.1/config/certificati/logstash.server.keystore.jks"  
> ssl\_keystore\_location =\> "/dati/logstash/logstash-7.1.1/keystore.jks"  
> ssl\_keystore\_password =\> "ICDCOLCMA"  
> ssl\_endpoint\_identification\_algorithm =\> ""

the kafka side configuration (kafka version **2.12-2.1.1** )

it has only one consumer which in turn sees other 3 followers (one of the 3 followers is the consumer itself). each topic has 3 partitions with relative replicas.

The same process logstash tested on a single kafka node (non-clustered) works perfectly.

can someone help me?

Thanks

* * *

1. 0-9

---

<div class="post-metadata">

### Author: ![tobydickinson](https://avatars.discourse-cdn.com/v4/letter/t/d07c76/32.png) [@tobydickinson](https://discuss.elastic.co/u/tobydickinson)
#### Post date: [September 4, 2019, 11:32am UTC](https://discuss.elastic.co/t/logstash-kafka-output-plugin-loss-of-events-or-delay-in-delivering-events/198035/2 "2019-09-04T11:32:35Z")

</div>

As a sanity check, can you publish messages to the topic using the console producer?

---

<div class="post-metadata">

### Author: ![giorgiogale](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@giorgiogale](https://discuss.elastic.co/u/giorgiogale)
#### Post date: [September 5, 2019, 1:00pm UTC](https://discuss.elastic.co/t/logstash-kafka-output-plugin-loss-of-events-or-delay-in-delivering-events/198035/3 "2019-09-05T13:00:34Z")

</div>

Thanks for the suggestion.  
Sending the event through the console it is received correctly.  
The problem is related to the ruby ​​code of the logstash process configuration file.  
Some additions made to the code inhibited the sending of the event.  
Excluding that code events are sent regularly.

---

<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: [October 3, 2019, 1:00pm UTC](https://discuss.elastic.co/t/logstash-kafka-output-plugin-loss-of-events-or-delay-in-delivering-events/198035/4 "2019-10-03T13:00:41Z")

</div>

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