Skip to content

Configuration

Config key Default Description
dont_disable_on_failed_delivery False Auto disable webhooks if delivery fails
delivery_attempts 5 Number of attempt to re-deliver a webhook before the message is dropped
delivery_backoff 10 Number of seconds used as a backoff factor between failed deliveries

Example

Here we configure Lime Webhooks to do one retry one hour after failed delivery and then disable the subscription if the second attempt fails.

plugins:
  lime_webhooks:
    dont_disable_on_failed_delivery: False
    delivery_attempts: 1
    delivery_backoff: 3600

Disable on failed delivery

A webhook subscription can be set to automatically be disabled if it fails to delivery. This is to stop a subscription to keep firing events if there is a problem on the receiving side.

Please note: It is enough for a single webhook message to completely fail in a subscription for it to be disabled. A message is send and fails to be delivered (msg1) it is then scheduled for re-delivery. In the meantime a new message (msg2) is send and succeeds. The subsequent re-deliveries of msg1 also fails and the subscription is disabled, even though other messages (msg2 etc.) in the same subscription might have had successful deliveries in the mean time.

If a subscription is disabled via a failed delivery, it will be logged and an internal event is sent. It is possible to subscribe via webhooks to the webhook.webhook.disabled event.

Delivery attempts

If a webhook fails to deliver, it will be retried again. You can configure how many re-delivery attempts a webhook will have. If the number of delivery attempts is exceeded the webhook message will be drop and lost. This will be logged and an internal event is sent. It is possible to subscribe via webhooks to the webhook.msg_dropped event.

Backoff between deliveries

Upon a failed delivery an new attempt will be made with exponential backoff.

Our algorithm is (2^n)*backoff_factor where n is the delivery attempt and backoff_factor is in seconds. Example with 10s of backoff:

Re-relivery #1 #2 #3 #4 #5
seconds to next re-delivery 10s 20s 40s 80s 160s
Back to top