You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MTChannelBroker: Enhance failed events with extra metadata #6541
If a message is routed to the deadletter sink of the MTChannelBroker or its Triggers, there is no contextual information on why the message landed there.
In a few Knative components, we have some metadata for this:
Hi, I am working on adding "knativeerrordest knativeerrorcode knativeerrordata" extensions on MTchannelBroker,
Most of the data in MTchannelBroker is processed by Channels:
In Control-Plane of MTchannelBroker, mt-broker-controller create subscription according to the information of the trigger, this subscription contains the address of subscriber(broker-filter) and the information of Broker, like this example:
So in the entire data flow, the path of event message is channel->broker-filter->target; and the path pf response is target->broker-filter->channel, and the extention "knativeerrordest" what we got is broker-filter's URI, but what we need is actual trigger's URI.
Based on this situation, there are two methods that we could get trigger's URI:
Method 1: In broker-filter, we could add a pair of key value in response body to store trigger's URI. After getting response Channel could unmarshal this URI when the destination is broker-filter.
Method 2: We could add processing logic about deadlettersink in broker-filter when sending error is not nil , do the same like Channel.
Which one is better? is there any other methods and what do you think? @pierDipi@matzew
Activity
liuchangyan commentedon Sep 27, 2022
/assign
lionelvillard commentedon Sep 27, 2022
We may want to go further by standardizing these attributes and adding them to the knative spec.
@gab-satchi @gabo1208 WDYT?
liuchangyan commentedon Oct 14, 2022
Hi, I am working on adding
"knativeerrordest knativeerrorcode knativeerrordata"extensions on MTchannelBroker,Most of the data in MTchannelBroker is processed by Channels:
In Control-Plane of MTchannelBroker,
mt-broker-controllercreatesubscriptionaccording to the information of thetrigger, this subscription contains the address ofsubscriber(broker-filter)and the information ofBroker, like this example:So in the entire data flow, the path of event message is
channel->broker-filter->target; and the path pf response istarget->broker-filter->channel, and the extention "knativeerrordest" what we got is broker-filter's URI, but what we need is actual trigger's URI.Based on this situation, there are two methods that we could get trigger's URI:
Method 1: In broker-filter, we could add a pair of key value in response body to store trigger's URI. After getting response Channel could unmarshal this URI when the destination is broker-filter.
Method 2: We could add processing logic about deadlettersink in broker-filter when sending error is not nil , do the same like Channel.
Which one is better? is there any other methods and what do you think? @pierDipi @matzew
Knative enhance failed events extensions in mt channel broker (#6569)