Passa al contenuto principale

Delivery Failure

This document describes the behaviour of the seal service in case it fails to seal and send a message and the steps it takes to notify the mxengine service.

seal service tries to seal and send a message repeatedly until configured conditions have been reached at which point the message is considered failed to seal. Then a failed status is sent to the mxengine service and the message is removed from queue.

Delivery Attempts

Two ENV variables specify how many retries and how often these retries for sealing shall be attempted.

SEAL_MAX_MESSAGE_RETRIES="10"

SEAL_MAX_MESSAGE_RETRIES specifies the max number of sealing attempts that will be tried before a message is considered failed to seal.

NACK_WAIT_RETRY="1m"

NACK_WAIT_RETRY specifies the duration between retry attempts. It uses the Golang string format for time.Duration like 1s (1 second) or 10m (10 minutes).

By using these two variables you can control how long a message stays in the queue and how many attempts for sealing are attempted.

Example

If SEAL_MAX_MESSAGE_RETRIES="10" and NACK_WAIT_RETRY="10m" then a message will stay in the queue for approximately 10 retries * 10 minutes = ~100 minutes before it is considered failed to seal.

Failure Notification

When a message is considered failed to seal, the seal service sends a 'failed' status to the mxengine service. The mxengine service then handles the message appropriately. In addition, the message is deleted from the message queue in the seal service.