Getting Started
Architecture
NServiceBus
Transports
Persistence
ServiceInsight
ServiceControl
Monitoring
Modernization
Samples

Failed Message Monitoring

Component: ServicePulse

When an NServiceBus endpoint fails to process a message, it performs a set of configurable attempts to recover from message failure. These attempts are referred to as "immediate retries" and "delayed retries" and in many cases allow the endpoint to overcome intermittent communication failures. See recoverability for more details.

If the automatic retry attempts also fail, the endpoint forwards the failed message to the error queue defined for all endpoints in the system. See Auditing with NServiceBus for more details.

ServicePulse (via ServiceControl) monitors the error queue and displays the current status and details of failed messages as an indicator in the ServicePulse dashboard.

Failed Messages indicator

Besides, ServicePulse also provides a Failed Messages page to assist in examining failed messages and taking specific actions on them.

Failed Messages page

Both the "Failed Messages" indicator in the Dashboard and the "Failed Messages" link in the navigation bar link to the Failed Messages screen. This page is split into various tabs.

Failed message groups tab

The first tab in the Failed Messages page shows error groups. A group is a set of failed messages grouped according to criterias like the same exception type.

This tab shows two lists, described below.

Last 10 completed retry requests list

This list is collapsed by default and shows information about the last ten completed group retry requests.

Last 10 completed retry requests list

A completed retry request represents a completed operation where messages from a given group were sent to the corresponding queue for processing. This means those messages may not have been processed yet. Learn more about retrying failed messages.

Failed groups list

This list shows all groups of currently failed messages.

Failed Message Groups list

The display of failed message groups can be changed via the "Group by" drop-down menu, according to the following classification types:

  • Exception Type and Stack Trace - groups messages both by exception type and stack trace. It is the default way of categorizing failed messages.
  • Message Type - groups messages by message type.
  • Endpoint Address - groups messages by endpoint address where the failure occurred.
  • Endpoint Instance - groups messages by endpoint instance identifier where the failure occurred.
  • Endpoint Name - groups messages by name of the endpoint where the failure occurred.
Managing failed message groups

The following actions can be performed on a failed message group:

  • View messages - Shows all individual messages contained in the group.
  • Request retry - Sends all failed messages to the corresponding queue to attempt processing again. When a failed group retry request is initiated, ServicePulse will present the progress of the operation.

Failed message groups retry in progress

  • Delete group - Deletes all messages contained in the group. Learn more about deleting messages.
  • Add note - Allows adding a freetext note for the group. Notes are automatically removed after the group is retried.

Failed message groups note

Listing messages

Individual failed messages can be viewed in one of the following two ways:

  • Inside a failed message group - in the "Failed Messages Group" tab, click the "View messages" link from a failed message group entry
  • All messages without any grouping - via the "All messages" tab

Failed Messages Page

Both of these message list views allow for taking actions on an individual message, on custom message selections or all messages contained in the view.

The following actions can also be taken on each message or a selection of messages:

  • Retry - Sends the message(s) to be reprocessed by the corresponding endpoint.
  • Delete - Deletes message(s).
  • Export - Export message(s) to a downloadable CSV file.

Message details page

The failed message details page is shared with All Messages.

Sharing message data from ServicePulse

The URL from that message's page can be copied to share the details of a specific message from ServicePulse.

Deleted Messages

Deleted Message Groups

This list shows all groups of deleted messages.

Deleted Message Groups Tab

The display of deleted message groups can be changed via the "Group by" drop-down menu, according to the following classification types:

  • Exception Type and Stack Trace - groups messages both by exception type and stack trace. It is the default way of categorizing failed messages.
  • Message Type - groups messages by message type.
  • Endpoint Address - groups messages by endpoint address where the failure occurred.
  • Endpoint Instance - groups messages by endpoint instance identifier where the failure occurred.
  • Endpoint Name - groups messages by name of the endpoint where the failure occurred.

Deleted Messages

Failed messages that cannot be processed successfully (or could not be retried due to various application-specific reasons) can be deleted and later viewed in the Deleted Messages tab.

Deleted Messages Tab

Learn more about deleting messages in ServicePulse.

Related Articles

  • Message Details
    Describes how ServicePulse displays details about messages. Also describes retrying, or deleting of failed messages.
  • Retrying failed messages
    Describes the concept and lifecycle of retrying messages in ServicePulse.