<p>I have 2 microservices running in a Kubernetes cluster on Azure. The &quot;Project&quot;-microservice sends out an event to Kafka when a project has been updated. The &quot;Analytics&quot;-microservice consumes the event, does some expensive calculations, and finally sends out an e-mail containing the results.</p>
<p>To avoid spamming the receiver, I want to implement some kind of debouncing pattern so that calculations are only done when an hour has passed since receiving the last update-event. Since the &quot;Analytics&quot;-microservice would be idle for most of the time and cold starts are not a problem, it would be advantageous if resources are unreserved while it is inactive.</p>
<p>How would one implement a debouncing scenario when using Kafka? I have thought of introducing a less resource-intensive microservice with the sole purpose of triggering the &quot;Analytics&quot;-microservice once an internal clock has expired. Is this a sensible solution? I would appreciate the input of someone who has dealt with a similar problem before.</p>

<p>Did you consider Temporal’s <em>durable timers</em>. See here: <a href="https://docs.temporal.io/docs/workflows/" rel="nofollow noreferrer">https://docs.temporal.io/docs/workflows/</a></p>
<p>You can also consider combining Temporal with <a href="https://spiderwiz.org/project/" rel="nofollow noreferrer">Spiderwiz</a> to streamline your entire workflow.</p>
