{"action":"created","issue":{"url":"https://api.github.com/repos/knative/eventing/issues/638","repository_url":"https://api.github.com/repos/knative/eventing","labels_url":"https://api.github.com/repos/knative/eventing/issues/638/labels{/name}","comments_url":"https://api.github.com/repos/knative/eventing/issues/638/comments","events_url":"https://api.github.com/repos/knative/eventing/issues/638/events","html_url":"https://github.com/knative/eventing/issues/638","id":384365271,"node_id":"MDU6SXNzdWUzODQzNjUyNzE=","number":638,"title":"Events should contain information about source channel","user":{"login":"nicolaferraro","id":4151857,"node_id":"MDQ6VXNlcjQxNTE4NTc=","avatar_url":"https://avatars2.githubusercontent.com/u/4151857?v=4","gravatar_id":"","url":"https://api.github.com/users/nicolaferraro","html_url":"https://github.com/nicolaferraro","followers_url":"https://api.github.com/users/nicolaferraro/followers","following_url":"https://api.github.com/users/nicolaferraro/following{/other_user}","gists_url":"https://api.github.com/users/nicolaferraro/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolaferraro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolaferraro/subscriptions","organizations_url":"https://api.github.com/users/nicolaferraro/orgs","repos_url":"https://api.github.com/users/nicolaferraro/repos","events_url":"https://api.github.com/users/nicolaferraro/events{/privacy}","received_events_url":"https://api.github.com/users/nicolaferraro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-26T14:51:43Z","updated_at":"2018-11-26T20:22:19Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"As discussed shortly in the Slack channel, in order to implement conditional logic at application level, events forwarded by a channel should contain information about the channel itself, so a application framework can dispatch them to the right handler.\r\n\r\nThis is useful in services that need to subscribe to multiple channels and treat events differently based on their origin.\r\n\r\nA possible way to implement this is to use Cloudevents [extensions](https://github.com/cloudevents/spec/blob/v0.1/extensions.md) that have a [http binding](https://github.com/cloudevents/spec/blob/v0.1/http-transport-binding.md#3131-http-header-names) mapping them to `CE-X-Yyy` headers.\r\n\r\nWe can use `CE-X-KnativeChannel` to set the source channel. I don't think there's need to track the history here, but only last one.\r\n\r\nI can work on this."},"comment":{"url":"https://api.github.com/repos/knative/eventing/issues/comments/441784384","html_url":"https://github.com/knative/eventing/issues/638#issuecomment-441784384","issue_url":"https://api.github.com/repos/knative/eventing/issues/638","id":441784384,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTc4NDM4NA==","user":{"login":"evankanderson","id":7959095,"node_id":"MDQ6VXNlcjc5NTkwOTU=","avatar_url":"https://avatars2.githubusercontent.com/u/7959095?v=4","gravatar_id":"","url":"https://api.github.com/users/evankanderson","html_url":"https://github.com/evankanderson","followers_url":"https://api.github.com/users/evankanderson/followers","following_url":"https://api.github.com/users/evankanderson/following{/other_user}","gists_url":"https://api.github.com/users/evankanderson/gists{/gist_id}","starred_url":"https://api.github.com/users/evankanderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evankanderson/subscriptions","organizations_url":"https://api.github.com/users/evankanderson/orgs","repos_url":"https://api.github.com/users/evankanderson/repos","events_url":"https://api.github.com/users/evankanderson/events{/privacy}","received_events_url":"https://api.github.com/users/evankanderson/received_events","type":"User","site_admin":false},"created_at":"2018-11-26T20:22:19Z","updated_at":"2018-11-26T20:22:19Z","author_association":"CONTRIBUTOR","body":"Would adding a URL path or other distinguishing routing information work for this purpose?\r\n\r\nI'm slightly concerned about this pattern as it seems to [violate a few of our design principles](https://github.com/knative/eventing/blob/master/docs/spec/motivation.md):\r\n\r\n> _enable late-binding event sources and event consumers_\r\n\r\nIf the consumer needs to know about the channels connected to it, it seems like this pushes the binding early (into the design phase), and makes the overall design more brittle.\r\n\r\n> _Services can be connected to create new applications without modifying producer or consumer_\r\n\r\nThis is a restatement of the above -- in this case, it feels like the consumer would need to be modified even for the same application architecture if different names are assigned to the routing path.\r\n\r\n\r\nI'm willing to believe that there's a good use case for this, but I'd like to better understand the use case so we can consider multiple solutions to the problem -- this has worked well in other API design areas where the best solution ends up being inspired by someone else's thought."}}
{"actor":{"display_login":"evankanderson"}}