Adding Kafka Source details on delivery spec (#5952)

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
This commit is contained in:
Matthias Wessendorf 2024-04-29 13:00:28 +02:00 committed by GitHub
parent 9b8fd6314d
commit 2fc233e0e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 35 additions and 0 deletions

View File

@ -266,6 +266,41 @@ can add to the `config-kafka-features` configmap, [read about the experimental K
}
```
## Handling Delivery Failures
The `KafkaSource` implements the `Delivery` Specificiation, allowing you to configure event delivery parameters for it, which are applied in cases where an event fails to be delivered:
```yaml
apiVersion: sources.knative.dev/v1beta1
kind: KafkaSource
metadata:
name: kafka-source
spec:
consumerGroup: knative-group
bootstrapServers:
- my-cluster-kafka-bootstrap.kafka:9092 # note the kafka namespace
topics:
- knative-demo-topic
delivery:
deadLetterSink:
ref:
apiVersion: serving.knative.dev/v1
kind: Service
name: example-sink
backoffDelay: <duration>
backoffPolicy: <policy-type>
retry: <integer>
sink:
ref:
apiVersion: serving.knative.dev/v1
kind: Service
name: event-display
```
The `delivery` API is discussed in the [Handling Delivery Failure](../../event-delivery) chapter.
## Optional: Specify the key deserializer
When `KafkaSource` receives a message from Kafka, it dumps the key in the Event extension called