Skip to content

What's the role of BrokerSpec.Delivery outside mtbroker implementations? #4515

@slinkydeveloper

Description

@slinkydeveloper

My understanding of BrokerSpec.Delivery documentation (https://github.com/knative/eventing/blob/master/pkg/apis/eventing/v1/broker_types.go#L77) is that it leaks the details of the mtbroker implementation:

// Delivery is the delivery specification for Events within the Broker mesh.

In fact this is used inside the broker controller to configure the subscription to internal channels https://github.com/knative/eventing/blob/master/pkg/reconciler/mtbroker/resources/subscription.go#L63. This should be decoupled from the spec itself, for example providing this delivery configuration through a config map and address it with BrokerSpec.Config (which is exactly the role of that field).

What this means outside the mtbroker implementation? How should we interpret it in other broker implementations?

E.g. this delivery spec, within the broker mesh, doesn't make sense in Kafka, because delivery spec (retries in particular) doesn't map to kafka semantics, where we have the at least once guaranteed by the protocol itself through coordination between sender and receiver (acks).

Additional Context

In case of eventing-kafka-broker we wrongly interpreted it and we use it as a "global default" of delivery for each trigger. If a trigger has a delivery spec, then use the trigger specific, otherwise use the global one, if any. I guess this probably has more sense as usage for this field.

How did you interpreted this field in gcp broker @grantr?

Proposals

  • Change the meaning to "defaulter" for trigger delivery spec
  • Remove it

Metadata

Metadata

Labels

area/deliverykind/bugCategorizes issue or PR as related to a bug.priority/awaiting-more-evidenceLowest priority. Possibly useful, but not yet enough support to actually get it done.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions