Handling failed delivery of events
The Broker is the component responsible for guaranteeing delivery of events, and provides what is commonly referred to as at-least-once delivery guarantees. Read more about at-least-once in the dedicated guide.
This guide talks about the configuration options available on Triggers that let you define how the system should behave in the case of failed delivery.
You can configure how events are delivered for each Trigger by adding a
delivery spec to the
Trigger object, as shown at the end of the following example:
apiVersion: eventing.triggermesh.io/v1alpha1 kind: Trigger metadata: name: mytrigger spec: broker: group: eventing.triggermesh.io kind: RedisBroker name: mybroker filters: - exact: type: mytype1 target: ref: apiVersion: targets.triggermesh.io/v1alpha1 kind: cloudeventstarget name: cloudeventstarget delivery: retry: 5 backoffDelay: PT5S backoffPolicy: constant deadLetterSink: uri: https://mycompany.com/deadletter
retryspecifies the number of times that event delivery is retried before the event is sent to the dead letter sink.
backoffDelaydelivery parameter specifies the time delay before an event delivery retry is attempted after a failure. The duration of the
backoffDelayparameter is specified using the ISO 8601 duration format. For example,
PT1Sspecifies a 1 second delay.
backoffPolicydelivery parameter can be used to specify the retry back off policy. The policy can be specified as either
exponential. When using the
linearback off policy, the back off delay is the time interval specified between retries. When using the
exponentialback off policy, the back off delay is equal to
deadLetterSinkspec contains configuration settings to enable using a dead letter sink. This tells the Subscription what happens to events that cannot be delivered to the subscriber. When this is configured, events that fail to be delivered are sent to the dead letter sink destination. The destination can be a reference to any TriggerMesh target, meaning anything could potentially be used to store dead lettered events. The destatination can also be URI. In the example above a URI is used.