argo-events
argo-events copied to clipboard
fix: Limit only accepted events in Kafka event source
The intention is to fix an issue with heavy loaded Kafka EventSource with filtration (when the number of filtered out events is much greater than the accepted). The rate limitation is now applied to accepted events only, and filtration speed does not slow down.
Another outcome is that (potentially) adding LimitEventsPerSecond property to other EventSources in the future will be simpler.
I haven't found a proper place to add unit tests, so tested the change in our in-house Argo Events instance in K8s.