Skip to content

Rethink extension build time instantiation of DefaultCamelContext #7027

@jamesnetherton

Description

@jamesnetherton

There's a few places outside of the CQ core where extensions explicitly instantiate their own DefaultCamelContext so that they can use it to pre-load stuff or get access to Camel resources in order to do build time enhancements.

This feels a bit heavyweight and has some limitations:

  • It slows down the build time code. Especially if you have all extensions that create DefaultCamelContext on the classpath.

  • It spams the build time logs with CamelContext messages which is potentially confusing for folks.

  • Occasionally we need to do special patches to fix issues (see Camel OpenTelemetry not compatible with Quarkus OpenTelemetry #6642). The service discovery mechanism we have for FastCamelContext does not apply to DefaultCamelContext. So we loose the ability to easily exclude / include services etc.

Maybe there's a more lightweight way to do things or have 'just enough' CamelConext to fulfil whatever build time requirements these extensions have.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions