mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
47 lines
1.6 KiB
Plaintext
47 lines
1.6 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * /serverless/develop/serverless-triggers.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="trigger-event-delivery-config_{context}"]
|
|
= Configuring event delivery ordering for triggers
|
|
|
|
If you are using a Kafka broker, you can configure the delivery order of events from triggers to event sinks.
|
|
|
|
.Prerequisites
|
|
|
|
* The {ServerlessOperatorName}, Knative Eventing, and Knative broker implementation for Apache Kafka are installed on your {product-title} cluster.
|
|
* Kafka broker is enabled for use on your cluster, and you have created a Kafka broker.
|
|
* You have created a project or have access to a project with the appropriate roles and permissions to create applications and other workloads in {product-title}.
|
|
* You have installed the OpenShift (`oc`) CLI.
|
|
|
|
.Procedure
|
|
|
|
. Create or modify a `Trigger` object and set the `kafka.eventing.knative.dev/delivery.order` annotation:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
apiVersion: eventing.knative.dev/v1
|
|
kind: Trigger
|
|
metadata:
|
|
name: <trigger_name>
|
|
annotations:
|
|
kafka.eventing.knative.dev/delivery.order: ordered
|
|
...
|
|
----
|
|
+
|
|
The supported consumer delivery guarantees are:
|
|
+
|
|
`unordered`:: An unordered consumer is a non-blocking consumer that delivers messages unordered, while preserving proper offset management.
|
|
+
|
|
`ordered`:: An ordered consumer is a per-partition blocking consumer that waits for a successful response from the CloudEvent subscriber before it delivers the next message of the partition.
|
|
+
|
|
The default ordering guarantee is `unordered`.
|
|
|
|
. Apply the `Trigger` object:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc apply -f <filename>
|
|
----
|