Install Heartbeats Plugin

Component: ServiceControl Heartbeats
NuGet Package NServiceBus.Heartbeat (2.x)
Target NServiceBus Version: 6.x

To install the Heartbeats plugin into an endpoint add the following to the endpoint configuration:

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

WARN: When installing the heartbeat plugin, 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.

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.

WARN: See Expired heartbeats for more information about what happens to expired heartbeats.


Last modified