Getting Started
Architecture
NServiceBus
Transports
Persistence
ServicePulse
ServiceControl
Monitoring
Samples

Managing Errors and Retries

Component: ServiceInsight

When a message fails during processing, NServiceBus will automatically retry it. If a message continues to fail, it is forwarded to the error queue and becomes visible within ServiceInsight.

The views in ServiceInsight show information about message processing failure of a message. No manual correlation of log files or access to remote servers is necessary to research the reasons for an error.

Status in the message list

The status of an errant message is illustrated in the message window. A message can have one of the statuses below.

An error in the message window

Successfully processed message: A message that was successfully processed. This requires message auditing to be enabled. Success icon

Message failed one time: A message moved to the error queue only once. Single error icon

Message failed multiple times: A message that has been retried at least once using tools like ServiceInsight or ServicePulse, and for which retries weren't able to process the message successfully. Multiple errors icon

Retry requested for message: A failed message for which a retry was requested from ServiceInsight or ServicePulse. If a message remains with this status, there is no further information about that message, neither failure nor audit for a successful processing. Once the message is re-processed, the status will change to either Resolved successfully or Message failed one time, or Message failed multiple times. Retry icon

Resolved successfully: The message was successfully processed after failure(s). Retry icon

Clock drift

A status icon of an exclamation sign overlay (⚠) is shown when the calculated critical time is negative . This is usually caused by clock drift. Clock drift can be mitigated by frequently syncing against the same shared time source via NTP.

The flow diagram

The flow diagram highlights errors in red and provides details with access to the stack trace.

Error in the flow diagram

The sequence diagram

The sequence diagram highlights handlers with errors in red.

Error in the sequence diagram

Retrying a failed message

Once the underlying cause for message processing failure has been resolved, the failed message can be retried from ServiceInsight. This can be done by finding the message to be retried and clicking on Retry Message.