Skip to content
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

Improve knative broker integration #326

Closed
nicolaferraro opened this issue May 14, 2020 · 4 comments · Fixed by #328
Closed

Improve knative broker integration #326

nicolaferraro opened this issue May 14, 2020 · 4 comments · Fixed by #328
Assignees

Comments

@nicolaferraro
Copy link
Member

When doing something like:

from("knative:event/x")
  .transform()
  .to("knative:event/y")

Then the event is delivered to the same service again. The reason is that the header containing the event type (x) overrides the event type "y" provided in the producer endpoint.

It's not so clear what happens.. Maybe we should make such override not enabled by default.

@davsclaus
Copy link
Contributor

Yeah in other components we have a special header named CamelOverrideXXX etc to indicate this fact

@lburgazzoli
Copy link
Contributor

I gues in this case we can safely ignore such header as the event is already specified in the URI ? in case you want this dynamic I guess we can use a simple expression and a tod ?

@nicolaferraro
Copy link
Member Author

I'm not sure toD works in this case because we have a strict relationship between endpoints and services in the KNATIVE_CONFIG env and the dynamic endpoint is not passed by the operator.

But in the case of the broker, the event name should not be mandatory to lookup the instance.
E.g. I might define a producer like .to("knative:event") and use the header to determine the event type, but this is not possible (null pointer exception).

@lburgazzoli
Copy link
Contributor

so if the event is set on the endpoint, then use it otherwise use the header one should work

@lburgazzoli lburgazzoli self-assigned this May 14, 2020
lburgazzoli added a commit to lburgazzoli/apache-camel-k-runtime that referenced this issue May 15, 2020
lburgazzoli added a commit to lburgazzoli/apache-camel-k-runtime that referenced this issue May 15, 2020
lburgazzoli added a commit to lburgazzoli/apache-camel-k-runtime that referenced this issue May 19, 2020
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants