NServiceBus icon indicating copy to clipboard operation
NServiceBus copied to clipboard

Stuck or very long running handlers can block the message pumps and should be logged if exceeding a configurable duration

Open ramonsmits opened this issue 6 years ago • 0 comments
trafficstars

Problem Description

Currently it's not possible to get notified when handlers take an exceeding long time to process a message. The only way is to actively monitor a specific message type in ServicePulse Monitoring. We don't have an option to set a threshold and get a warning in our logs or get a notification in any other way. This makes it harder for developers and operations to be pro-actively warned about handlers that exceed a certain time threshold.

This is an issue that is encountered in support cases pretty often and which could simply be discovered by either customers and support personel when this is included in logfiles.

Possible solution

I've written a custom component called NServiceBus.SimpleMonitoring that logs the processing time as a DEBUG level message and when a speciied threshold is exceeded, adds and additional WARNING level message. We could incorporate this into NServiceBus Core.

ramonsmits avatar Jul 17 '19 12:07 ramonsmits