Expired heartbeat messages

Heartbeat messages have a time to be received (TTBR) set based on the time to live (TTL) value. If ServiceControl does not consume the heartbeat messages before the TTBR expires then those messages may be discarded. Transports like MSMQ and Azure Service Bus support dead letter queues (DLQ) and the expired heartbeat messages can be explicitly configured to be forwarded to the DLQ instead of being discarded.

MSMQ

Although NServiceBus configures the use of DLQ by default, messages that are defined with TTBR will not be automatically forwarded to the DLQ and will be discarded. Configuration can be specified to override this behavior so that these messages can be forwarded to the DLQ.

When using NServiceBus Versions 6.1 or below, messages will be forwarded to the DLQ even if TTBR is set on the messages. To avoid this behavior, DLQ can be disabled by configuring the MSMQ connection strings. The heartbeat messages will be forwarded to the DLQ when ServiceControl is either stopped or very busy. In this case, the dead letter queue needs to be monitored and cleaned up.

Azure Service Bus

Forwarding messages with expired TTL to DLQ is a configuration that needs to be set on the destination queue which is the ServiceControl queue for the heartbeat messages. In order to forward the heartbeat messages after the TTBR expiration to DLQ, ServiceControl needs to be explicitly configured by specifying EnableDeadLetteringOnMessageExpiration.


Last modified