Broker configuration example

The following is a full example of a multi-tenant (MT) channel-based Broker object which shows the possible configuration options that you can modify:

  1. apiVersion: eventing.knative.dev/v1
  2. kind: Broker
  3. metadata:
  4. name: default
  5. namespace: default
  6. annotations:
  7. eventing.knative.dev/broker.class: MTChannelBasedBroker
  8. spec:
  9. config:
  10. apiVersion: v1
  11. kind: ConfigMap
  12. name: config-br-default-channel
  13. namespace: knative-eventing
  14. delivery:
  15. deadLetterSink:
  16. ref:
  17. kind: Service
  18. namespace: example-namespace
  19. name: example-service
  20. apiVersion: v1
  21. uri: example-uri
  22. retry: 5
  23. backoffPolicy: exponential
  24. backoffDelay: "2007-03-01T13:00:00Z/P1Y2M10DT2H30M"
  • You can specify any valid name for your broker. Using default will create a broker named default.
  • The namespace must be an existing namespace in your cluster. Using default will create the broker in the current namespace.
  • 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 broker class. For more information about Kafka brokers, see the Apache Kafka Broker documentation.
  • spec.config is used to specify the default backing channel configuration for MT channel-based broker implementations. For more information on configuring the default channel type, see the documentation on Configure Broker defaults.
  • 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.