What does event.cancel() do?

I've recently been using logstash to pass data from the database to elaticsearch. One of the plugins that I'm using is the aggregate filter. In some of the examples, there is event.cancel() that is said to cancel events.

What does this really mean? Are the events from the events API just deleted? Would love to hear anything from someone that knows. Thanks!

event.cancel just deletes the event that is being processed. You would use it circumstances where aggregate saves all the required fields from the event in the map and then creates a new event later (i.e. either push_map_as_event_on_timeout or push_previous_map_as_event is set).

I see. So, you would use event.cancel in order to prevent currently processed events being used any further?

Exactly.