ThreeDotsLabs / watermill

Building event-driven applications the easy way in Go.
https://watermill.io
MIT License
6.83k stars 359 forks source link

Publish message processing delay in metrics Middleware? #417

Open evankanderson opened 5 months ago

evankanderson commented 5 months ago

We recently had an outage due to (incorrect) configuration of Retry without Poison. However, one of the items that came out of that was a realization that we didn't really have a good way to publish what our event-processing delay / backlog was.

This would require storing a "publish_time" or "timestamp" attribute in the message Metadata during publish, and then parsing that in the subscriber to report on processing latency.

Would there be interest in that addition to the metrics module, or is this something we should do in our own Middleware / Publisher?