|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * serverless/admin_guide/serverless-configuration.adoc |
| 4 | + |
| 5 | +:_content-type: PROCEDURE |
| 6 | +[id="serverless-broker-backing-channel-default_{context}"] |
| 7 | += Configuring the default broker backing channel |
| 8 | + |
| 9 | +If you are using a channel-based broker, you can set the default backing channel type for the broker to either `InMemoryChannel` or `KafkaChannel`. |
| 10 | + |
| 11 | +.Prerequisites |
| 12 | + |
| 13 | +* You have administrator permissions on {product-title}. |
| 14 | +* You have installed the {ServerlessOperatorName} and Knative Eventing on your cluster. |
| 15 | +* You have installed the OpenShift (`oc`) CLI. |
| 16 | +* If you want to use Kafka channels as the default backing channel type, you must also install the `KnativeKafka` CR on your cluster. |
| 17 | +
|
| 18 | +.Procedure |
| 19 | + |
| 20 | +. Modify the `KnativeEventing` custom resource (CR) to add configuration details for the `config-br-default-channel` config map: |
| 21 | ++ |
| 22 | +[source,yaml] |
| 23 | +---- |
| 24 | +apiVersion: operator.knative.dev/v1alpha1 |
| 25 | +kind: KnativeEventing |
| 26 | +metadata: |
| 27 | + name: knative-eventing |
| 28 | + namespace: knative-eventing |
| 29 | +spec: |
| 30 | + config: <1> |
| 31 | + config-br-default-channel: |
| 32 | + channel-template-spec: | |
| 33 | + apiVersion: messaging.knative.dev/v1beta1 |
| 34 | + kind: KafkaChannel <2> |
| 35 | + spec: |
| 36 | + numPartitions: 6 <3> |
| 37 | + replicationFactor: 3 <4> |
| 38 | +---- |
| 39 | +<1> In `spec.config`, you can specify the config maps that you want to add modified configurations for. |
| 40 | +<2> The default backing channel type configuration. In this example, the default channel implementation for the cluster is `KafkaChannel`. |
| 41 | +<3> The number of partitions for the Kafka channel that backs the broker. |
| 42 | +<4> The replication factor for the Kafka channel that backs the broker. |
| 43 | + |
| 44 | +. Apply the updated `KnativeEventing` CR: |
| 45 | ++ |
| 46 | +[source,terminal] |
| 47 | +---- |
| 48 | +$ oc apply -f <filename> |
| 49 | +---- |
0 commit comments