Getting Started
Architecture
NServiceBus
Transports
Persistence
ServiceInsight
ServicePulse
ServiceControl
Monitoring
Samples

Heartbeat plugin installation

NuGet Package: NServiceBus.Heartbeat (3.x)
Target Version: NServiceBus 7.x

To install the heartbeat plugin in an endpoint, reference the NServiceBus.Heartbeat NuGet package and configure the endpoint to send heartbeats:

var endpointConfiguration = new EndpointConfiguration("MyEndpoint");
endpointConfiguration.SendHeartbeatTo(
    serviceControlQueue: "ServiceControl_Queue",
    frequency: TimeSpan.FromSeconds(15),
    timeToLive: TimeSpan.FromSeconds(30));

Heartbeat interval

The plugin sends heartbeat messages with a default frequency of 10 seconds. As shown above, the frequency may be overridden for each endpoint.

Time-To-Live (TTL)

The plugin sends heartbeat messages with a default TTL of four times the frequency. As shown above, the TTL may be overridden for each endpoint. See the documentation for expired heartbeats for more information.

Identifying scaled-out endpoints

When the heartbeat plugin is installed in a scaled-out endpoint, each endpoint instance must be configured with a unique host identifier. The identifiers are used by ServiceControl to keep track of all instances and to identify which instance sent a given heartbeat message.