logstash-plugins / logstash-input-kafka

Kafka input for Logstash
Apache License 2.0
139 stars 122 forks source link

Kafka Input Plugin: Shutdown semantics #284

Open kaihil opened 6 years ago

kaihil commented 6 years ago

I have a question regarding the shutdown semantics of Logstash's Kafka Input Plugin:

When I run it with default settings, send a batch of 10.000 message into kafka and restart* logstash while it is processing the message, I end up with more than 10.000 (e.g. 10.212) messages in ES.

So at a first glance it looks like it just continues at the last commit done via the auto_commit_interval_ms (which may be up to 5seconds old). But I would assume that the plugin properly closes the consumer and sends a last offset commit to avoid double processing of messages.

Now I wonder how this is supposed to work?

Thank you in advance! Kai

*) I restart logstash with a SIGTERM first, wait until it is properly shut down and then wait a minute to start it again.

numbnut commented 6 years ago

Hi, any news regarding this issue?