Book Image

Learning NServiceBus Sagas

By : Richard L Helton
Book Image

Learning NServiceBus Sagas

By: Richard L Helton

Overview of this book

Table of Contents (13 chapters)

Introducing CustomChecks for ServicePulse


With the ServiceControl.Plugin.CustomChecks plugin installed, we can perform several checks. In this section, we will be using the PubSub--ReportFailure solution—the MyPublisher project reports a failure check that will be reported in ServicePulse. This solution shows custom checks. In this section, we will also be using the PubSub--ReportPass solution—the MyPublisher project reports a pass check that will be reported in ServicePulse.

The following two functions can be used in the CustomCheck class using the ServiceControl.Plugin.CustomChecks plugin to generate a failure or pass condition to the ServicePulse dashboard:

  • ReportPass: This will report that the custom check has passed.

  • ReportFailed: This will report that a custom check has failed, passing in the string as the reason for the failure.

Here, we will create the code for a CustomCheck object that can be called when we submit a payment as an additional check. It is a simple constructor in a MyCustomCheck...