The overflow consumer only gets bad events, which of course means it might process a full batch of events that all timeout.
As such the thread can be completely clogged for a decent amount of timing, missing a kafka heartbeat.
Changes
Adds heartbeats to the function calls so that we can keep the healthy status up
I have a feeling it will need more than this, some sort of nextTick to make sure that there is space for callbacks to fire but I want to try just this first
Problem
The overflow consumer only gets bad events, which of course means it might process a full batch of events that all timeout.
As such the thread can be completely clogged for a decent amount of timing, missing a kafka heartbeat.
Changes
nextTick
to make sure that there is space for callbacks to fire but I want to try just this first👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Does this work well for both Cloud and self-hosted?
How did you test this code?