|
1 | 1 | # Developer configuration options
|
2 | 2 |
|
| 3 | +## Broker configuration |
| 4 | + |
| 5 | +- You can specify any valid `name` for your broker. Using `default` will create a broker named `default`. |
| 6 | +- The `namespace` must be an existing namespace in your cluster. Using `default` will create the broker in the `default` namespace. |
| 7 | + |
| 8 | +### Event Delivery Options |
| 9 | +- You can use `dead-letter sink` for error handling and auditing of undelivered messages. Specify Kubernetes object reference where undelivered messages will be sent using `ref` and an optional URI to route undelivered messages using `uri`. |
| 10 | +- You can set the `Backoff policies` to define the delay strategy between retry attempts. It can be `exponential` or `linear`. |
| 11 | +- You can set the `Backoff delay` to specify the initial delay before retrying, using the ISO 8601 duration format. |
| 12 | +- You can specify the number of retry attempts before sending the event to the dead-letter sink using the `retry` configuration. |
| 13 | +- `spec.delivery` is used to configure event delivery options. Event delivery options specify what happens to an event that fails to be delivered to an event sink. For more information, see the documentation on [Event delivery](../event-delivery.md). |
| 14 | + |
| 15 | +### Advanced broker class options |
| 16 | +When a Broker is created without a specified `eventing.knative.dev/broker.class` annotation, by default the `MTChannelBasedBroker` Broker class is used, as specified in the `config-br-defaults` ConfigMap. |
| 17 | + |
| 18 | +In case you have multiple Broker classes installed in your cluster and want to use a non-default Broker class for a Broker, you can modify the `eventing.knative.dev/broker.class` annotation and `spec.config` for the Broker object. |
| 19 | + |
| 20 | +1. Set the `eventing.knative.dev/broker.class` annotation. Replace `MTChannelBasedBroker` in the following example with the class type you want to use. Be aware that the Broker class annoation is immutable and thus can't be updated after the Broker got created: |
| 21 | + |
| 22 | +2. Configure the `spec.config` with the details of the ConfigMap that defines the required configuration for the Broker class (e.g. with some Channel configurations in case of the `MTChannelBasedBroker`): |
| 23 | + |
| 24 | +For further information about configuring a default Broker class cluster wide or on a per namespace basis, check the [Administrator configuration options](../configuration/broker-configuration.md#configuring-the-broker-class). |
| 25 | + |
3 | 26 | ## Broker configuration example
|
4 | 27 |
|
5 | 28 | The following is a full example of a Channel based Broker object which shows the possible configuration options that you can modify:
|
|
30 | 53 | backoffPolicy: exponential
|
31 | 54 | backoffDelay: "PT1S"
|
32 | 55 | ```
|
33 |
| -
|
34 |
| -- You can specify any valid `name` for your broker. Using `default` will create a broker named `default`. |
35 |
| -- The `namespace` must be an existing namespace in your cluster. Using `default` will create the broker in the `default` namespace. |
36 |
| -- You can set the `eventing.knative.dev/broker.class` annotation to change the class of the broker. The default broker class is `MTChannelBasedBroker`, but Knative also supports use of the `Kafka` and `RabbitMQBroker` broker class. For more information see the [Apache Kafka Broker](../brokers/broker-types/kafka-broker/README.md) or [RabbitMQ Broker](../brokers/broker-types/rabbitmq-broker/README.md) documentation. |
37 |
| -- `spec.config` is used to specify the default backing channel configuration for Channel based Broker implementations. For more information on configuring the default channel type, see the documentation on [Configure Broker defaults](../configuration/broker-configuration.md). |
38 |
| -- `spec.delivery` is used to configure event delivery options. Event delivery options specify what happens to an event that fails to be delivered to an event sink. For more information, see the documentation on [Event delivery](../event-delivery.md). |
|
0 commit comments