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

Register camel <--> CDI event bridges only when observers for the events are detected #3149

Closed
lburgazzoli opened this issue Oct 1, 2021 · 1 comment
Assignees
Milestone

Comments

@lburgazzoli
Copy link
Contributor

As today, the CamelContextRecorder configures the CamelContext to automatically bridge camel events to CDI events:

context.addLifecycleStrategy(new CamelLifecycleEventBridge());
context.getManagementStrategy().addEventNotifier(new CamelManagementEventBridge());

But if no observers for such events are defined, the camel <--> CDI event bridges should not be installed.

@jamesnetherton jamesnetherton self-assigned this Oct 1, 2021
@jamesnetherton jamesnetherton added this to the 2.4.0 milestone Oct 1, 2021
@davsclaus
Copy link
Contributor

Also pay attention that ideally the CamelManagementEventBridge should only return true for the events groups it wants to listen for.

Its "expensive" to listen for exchange events as they are fired many times during routing. However events for starting / stopping camel context / routes are light and no problem.

camel-core has been optimized to handle these two kinds and does special optimization if there are no exchange events in use.

jamesnetherton added a commit to jamesnetherton/camel-quarkus that referenced this issue Oct 4, 2021
jamesnetherton added a commit to jamesnetherton/camel-quarkus that referenced this issue Oct 5, 2021
ppalaga pushed a commit to ppalaga/camel-quarkus that referenced this issue Oct 6, 2021
ppalaga pushed a commit to jboss-fuse/camel-quarkus that referenced this issue Oct 7, 2021
ppalaga pushed a commit to ppalaga/camel-quarkus that referenced this issue Jan 12, 2022
ppalaga pushed a commit that referenced this issue Jan 12, 2022
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

No branches or pull requests

3 participants