# Kafka Input Plugin: Shutdown semantics

**URL:** <https://discuss.elastic.co/t/kafka-input-plugin-shutdown-semantics/123785>\
**Category:** Logstash\
**Created:** [March 13, 2018, 5:19pm UTC](https://discuss.elastic.co/t/kafka-input-plugin-shutdown-semantics/123785 "2018-03-13T17:19:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaihil](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kaihil](https://discuss.elastic.co/u/kaihil)\
**Post date:** [March 13, 2018, 5:19pm UTC](https://discuss.elastic.co/t/kafka-input-plugin-shutdown-semantics/123785/1 "2018-03-13T17:19:37Z")

</div>

Hello,

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.

---

<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:** [April 10, 2018, 5:19pm UTC](https://discuss.elastic.co/t/kafka-input-plugin-shutdown-semantics/123785/2 "2018-04-10T17:19:46Z")

</div>

Closed on April 10, 2018, 5:19pm UTC

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