Claus Ibsen created CAMEL-25099:
-----------------------------------
Summary: camel-main - Configuration options not applied: fix bugs
found in a deep review
Key: CAMEL-25099
URL: https://issues.apache.org/jira/browse/CAMEL-25099
Project: Camel
Issue Type: Bug
Components: camel-main
Reporter: Claus Ibsen
A review of how camel-main applies its configuration options found these bugs:
# {{camel.trace.traceRests}} is documented (and in the metadata) as default
true, but the field defaults to false, and camel-main sets that on the
CamelContext, so the backlog tracer does not trace the routes of the Rest DSL
(also with {{camel run}}).
# Wildcard component options ({{camel.component.seda*.queueSize=123}}) are only
applied to the components that exist at startup. The wildcard properties are
cleared right after registering the listener for components added later, so
components created when routes are built (most real components) are not
configured. The existing MainSedaWildcardTest looked up {{seda}} twice instead
of {{seda2}}.
# Options of {{metrics()}}, {{otel()}} and {{lra()}} configured using the Java
API are never applied to the service, and {{withEnabled(false)}} still enables
it. This affects the {{--metrics}} option of camel-jbang (KameletMain), which
enables message history and event notifiers using the Java API.
# The cloud properties location: the documented
{{camel.main.cloudPropertiesLocation}} key and {{setCloudPropertiesLocation}}
are ignored (only {{camel.main.cloud-properties-location}} works), override
properties are lost when cloud properties are loaded, it fails with
NullPointerException when configured as an initial or override property, and
{{withCloudPropertiesLocation}} takes a boolean and does nothing.
# {{camel.main.streamCachingBufferSize}} sets the buffer size to 0 when not
configured.
# {{camel.main.streamCachingStatisticsEnabled}} is never applied.
# {{camel.server.useGlobalSslContextParameters=false}} (and
{{camel.management.}}) is ignored when global SSL is enabled, as the check runs
after the properties are bound (and removed).
# A custom {{ManagementStrategy}} bean in the registry makes {{EventFactory}},
{{ManagementObjectNameStrategy}} and event notifier beans be set on the
replaced (old) management strategy.
Not changed:
* The javadoc of streamCachingBufferSize says the default is 4096 (it is 16384).
* producerTemplateCacheSize and consumerTemplateCacheSize are only used by
camel-spring-boot.
* Some fluent builder methods have misleading names (such as
withStreamCachingAnySpoolRules(String)).
* The duplicate SSL configuration is fixed in a separate ticket (bootstrap).
_Claude Code on behalf of Claus Ibsen_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)