-
Notifications
You must be signed in to change notification settings - Fork 593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What's the role of BrokerSpec.Delivery outside mtbroker implementations? #4515
Comments
seems like imp detail that was exposed, to early ? well, or for channel based brokers.. (unlike w/ Rabbit / Kafka broker)... but than the so that field feels "wrong" |
that's the original intent. |
If that's the case, then the doc is wrong/unclear and our usage in mtbroker is wrong too |
A trigger has no delivery spec.
This is related to this issue: #4057 (We should re-open it) |
In GCP broker we interpret broker's delivery spec as a global default for all triggers attached to the broker (google/knative-gcp#1536). The backend is capable of per-trigger delivery specs, but we don't have an API that can set them. We also have a configmap that sets a default delivery spec for all brokers (google/knative-gcp#1566). We currently rely on PubSub to implement retry and dead letter policy. Some translation is required to get the generic delivery spec into a form supported by PubSub. This is explained in more detail in https://github.com/google/knative-gcp/blob/master/docs/spec/delivery.md.
I haven't thought about it too carefully, but maybe it would be reasonable to define a DeliveryPolicy CRD with a webhook that applies its policy to triggers matching a selector, annotating the trigger with the specifics of the policy applied. This would allow for a default policy specification and leave the door open for alternate versions of that CRD that are implementation-specific. @tommyreddad implemented all this so he's more expert than me on the details. |
My $.02 here is, do we have a concrete use case for having a per trigger delivery spec that's different from a Broker specific. I know there's a lot of things we can do, but before complicating things by having various places to have this configured, want to make sure that we have a concrete use case (aka, somebody is trying to do something that they can't). I haven't heard anybody asking for it, which is not to say nobody's asked for it, but just asking. |
So I guess you misinterpreted like we did in eventing-kafka-broker 😄 . What should we do with this field then? |
TBH this sounds like a next step to the simpler solution of supporting |
@slinkydeveloper have you gotten answers to your questions above? Should we open a new issue to track the different issue as you described? |
I think we still didn't agreed on this issue, let me go through it at today eventing delivery wg |
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Propose #4515 Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Suggestions Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Little change to the spec Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Better comment Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Update codegen Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Updated yamls Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Removed default word Added more wording in the spec Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Added the delivery field to v1beta1 spec too Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
@slinkydeveloper can this be closed now? |
No, need to implement the change to the mtbroker |
/assign |
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: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
The text was updated successfully, but these errors were encountered: