# Limit number of events

**URL:** <https://discuss.elastic.co/t/limit-number-of-events/120898>\
**Category:** Logstash\
**Created:** [February 21, 2018, 4:56pm UTC](https://discuss.elastic.co/t/limit-number-of-events/120898 "2018-02-21T16:56:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![umapada](https://avatars.discourse-cdn.com/v4/letter/u/97f17d/32.png) [@umapada](https://discuss.elastic.co/u/umapada)\
**Post date:** [February 21, 2018, 4:56pm UTC](https://discuss.elastic.co/t/limit-number-of-events/120898/1 "2018-02-21T16:56:45Z")

</div>

Is there a way, I can limit the number of events in logstash. e.g. I want filtered 5 events in every one second

---

<div class="post-metadata">

**Author:** ![paz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paz/32/28003_2.png) [@paz](https://discuss.elastic.co/u/paz)\
**Post date:** [February 21, 2018, 5:03pm UTC](https://discuss.elastic.co/t/limit-number-of-events/120898/2 "2018-02-21T17:03:16Z")

</div>

It depends. Do you want to limit the actual processing rate, or process 5 events and drop the rest?

If it's the latter, you can check the [throttle filter](https://www.elastic.co/guide/en/logstash/current/plugins-filters-throttle.html) for that.

---

<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:** [March 21, 2018, 5:03pm UTC](https://discuss.elastic.co/t/limit-number-of-events/120898/3 "2018-03-21T17:03:19Z")

</div>

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