ServiceControl is the backend for ServicePulse and ServiceInsight. It is a background process that collects useful information about an NServiceBus system. This includes messages that cannot be processed, their exceptions, and the ability to collect every message flowing through the system. It can also collect saga state changes, endpoint heartbeats, and perform custom checks. This information is exposed to ServicePulse and ServiceInsight via an HTTP API.
ServiceControl can also be configured to collect detailed performance metrics for display in ServicePulse.
For more information on how ServiceControl, ServicePulse, and ServiceInsight work together, refer to the Particular Service Platform article. For a quick overview of the different instances, what they do and how to configure endpoints, refer to the how does ServiceControl work article.
ServiceControl instance types
There are three types of instances that can be created:
- Error instances This is the most commonly used ServiceControl instance and indispensable to ensure the smooth operation of an NServiceBus system. Together with ServicePulse, it provides the ability to visualize and retry failed messages.
- Audit instances Audit instances provide valuable information about the message flow through a system. Among other things, this is used by ServiceInsight to help visualize a distributed system.
- Monitoring instances Monitoring instances performance monitoring and analyzing additional metrics and are useful for keeping track of the health of a distributed system.
Connect endpoints to ServiceControl
NServiceBus endpoints must be configured to send data about their operations to a set of centralized queues that are unique to the system. ServiceControl monitors these queues, then collects and processes the data from the NServiceBus endpoints.
Note that the data is sent to queues, even when ServiceControl is down. When ServiceControl becomes available, it will process the messages that were stored in the queue while it was offline.
To enable ServiceControl to gather this information, configure the endpoints appropriately:
- Configure recoverability to collect failed messages.
- Enable auditing to collect all messages.
- Install plugins to monitor endpoint health, collect saga state changes, and use custom checks.
See Optimizing ServiceControl for use in different environments for more information about practical considerations.