# How to avoid sending duplicate events when Winlogbeat is processing duplicate events

**URL:** <https://discuss.elastic.co/t/how-to-avoid-sending-duplicate-events-when-winlogbeat-is-processing-duplicate-events/240883>\
**Category:** Beats\
**Tags:** winlogbeat\
**Created:** [July 13, 2020, 2:22am UTC](https://discuss.elastic.co/t/how-to-avoid-sending-duplicate-events-when-winlogbeat-is-processing-duplicate-events/240883 "2020-07-13T02:22:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aixic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aixic/32/66091_2.png) [@aixic](https://discuss.elastic.co/u/aixic)\
**Post date:** [July 13, 2020, 2:22am UTC](https://discuss.elastic.co/t/how-to-avoid-sending-duplicate-events-when-winlogbeat-is-processing-duplicate-events/240883/1 "2020-07-13T02:22:49Z")

</div>

我是一个新手开发者，我想了解Winlogbeat是如何避免出现发送重复的日志。我通过复现beats/winlogbeat/beater/eventlogger.go 中的  
`for _, lr := range records { client.Publish(lr.ToEvent()) } `  
会出现同一日志一直刷新created进行输出

---

<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:** [August 10, 2020, 2:22am UTC](https://discuss.elastic.co/t/how-to-avoid-sending-duplicate-events-when-winlogbeat-is-processing-duplicate-events/240883/2 "2020-08-10T02:22:57Z")

</div>

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