Install Heartbeats Plugin

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

To install the Heartbeats plugin into an endpoint, reference the NServiceBus.Heartbeat NuGet package and add the following to the endpoint configuration:

var endpointConfiguration = new EndpointConfiguration("MyEndpoint");
    serviceControlQueue: "ServiceControl_Queue",
    frequency: TimeSpan.FromSeconds(15),
    timeToLive: TimeSpan.FromSeconds(30));
ServiceControl_Queue is a placeholder for the actual ServiceControl input queue. The ServiceControl input queue is equal to the ServiceControl service name as configured in the ServiceControl Management tool.

Heartbeat interval

Heartbeat messages are sent by the plugin at a predefined interval of 10 seconds. As shown above, the interval value can be overridden on a per-endpoint basis.

When configuring the heartbeat interval, ensure the ServiceContol setting HeartbeatGracePeriod is greater than the heartbeat interval.

Time-To-Live (TTL)

When the plugin sends heartbeat messages, the default TTL is fixed to four times the value of the heartbeat interval. As shown above, the interval value can be overridden on a per-endpoint basis. See Expired heartbeats for more information about what happens to expired heartbeats.

Identifying scaled-out endpoints

When installing the heartbeat plugin on a scaled-out endpoint, also configure each instance with a deterministic Host Identifier. This identifier is used to keep track of which instance is sending heartbeat messages to the ServiceControl instance.

Last modified