Event delivery

Overview

Knative Eventing provides various configuration parameters to control the delivery of events in case of failure. For instance, you can decide to retry sending events that failed to be consumed, and if this didn’t work you can decide to forward those events to a dead letter sink.

Configuring Subscription Delivery

Knative Eventing offers fine-grained control on how events are delivered for each subscription by adding a delivery section. Consider this example:

  1. apiVersion: messaging.knative.dev/v1beta1
  2. kind: Subscription
  3. metadata:
  4. name: with-dead-letter-sink
  5. spec:
  6. channel:
  7. apiVersion: messaging.knative.dev/v1beta1
  8. kind: InMemoryChannel
  9. name: default
  10. delivery:
  11. deadLetterSink:
  12. ref:
  13. apiVersion: serving.knative.dev/v1
  14. kind: Service
  15. name: error-handler
  16. subscriber:
  17. uri: http://doesnotexist.default.svc.cluster.local

The deadLetterSink specifies where to send events that failed be consumed by subscriber.

Common Delivery Parameters

deadLetterSink

When present, events that failed to be consumed are sent to the deadLetterSink. In case of failure, the event is dropped and an error is logged into the system.

The deadLetterSink value must be a Destination.

  1. spec:
  2. delivery:
  3. deadLetterSink: <Destination>

Channel Support

The table below summarizes what delivery parameters are supported for each channel implementation.

Channel TypeSupported Delivery Parameters
In-MemorydeadLetterSink
Kafkanone
Natssnone
GCP PubSubnone