Package org.apache.camel.main
Class DefaultConfigurationProperties<T>
java.lang.Object
org.apache.camel.main.DefaultConfigurationProperties<T>
- Direct Known Subclasses:
MainConfigurationProperties
Common set of configuration options used by Camel Main, Camel Spring Boot and other runtimes.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addGlobalOption
(String key, Object value) Adds a global options that can be referenced in the camel contextorg.apache.camel.LoggingLevel
int
int
int
int
int
The capacity the pool (for each consumer) uses for storing exchanges.org.apache.camel.ManagementMBeansLevel
org.apache.camel.ManagementStatisticsLevel
int
getName()
int
int
long
int
org.apache.camel.StartupSummaryLevel
int
long
int
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
setAllowUseOriginalMessage
(boolean allowUseOriginalMessage) Sets whether to allow access to the original message from Camel's error handler, or from org.apache.camel.spi.UnitOfWork.getOriginalInMessage().void
setAutoStartup
(boolean autoStartup) Sets whether the object should automatically start when Camel starts.void
setAutowiredEnabled
(boolean autowiredEnabled) Whether autowiring is enabled.void
setBeanIntrospectionExtendedStatistics
(boolean beanIntrospectionExtendedStatistics) Sets whether bean introspection uses extended statistics.void
setBeanIntrospectionLoggingLevel
(org.apache.camel.LoggingLevel beanIntrospectionLoggingLevel) Sets the logging level used by bean introspection, logging activity of its usage.void
setBeanPostProcessorEnabled
(boolean beanPostProcessorEnabled) Can be used to turn off bean post processing.void
setCamelEventsTimestampEnabled
(boolean camelEventsTimestampEnabled) Whether to include timestamps for all emitted Camel Events.void
setCaseInsensitiveHeaders
(boolean caseInsensitiveHeaders) Whether to use case sensitive or insensitive headers.void
setCompileWorkDir
(String compileWorkDir) Work directory for compiler.void
setConsumerTemplateCacheSize
(int consumerTemplateCacheSize) Consumer template endpoints cache size.void
setContextReloadEnabled
(boolean contextReloadEnabled) Used for enabling context reloading.void
setDescription
(String description) Sets the description (intended for humans) of the Camel application.void
setDevConsoleEnabled
(boolean devConsoleEnabled) Whether to enable developer console (requires camel-console on classpath).void
setDumpRoutes
(String dumpRoutes) If dumping is enabled then Camel will during startup dump all loaded routes (incl rests and route templates) represented as XML/YAML DSL into the log.void
setDumpRoutesGeneratedIds
(boolean dumpRoutesGeneratedIds) Whether to include auto generated IDs in the dumped output.void
setDumpRoutesInclude
(String dumpRoutesInclude) Controls what to include in output for route dumping.void
setDumpRoutesLog
(boolean dumpRoutesLog) Whether to log route dumps to Loggervoid
setDumpRoutesOutput
(String dumpRoutesOutput) Whether to save route dumps to an output file.void
setDumpRoutesResolvePlaceholders
(boolean dumpRoutesResolvePlaceholders) Whether to resolve property placeholders in the dumped output.void
setDumpRoutesUriAsParameters
(boolean dumpRoutesUriAsParameters) When dumping routes to YAML format, then this option controls whether endpoint URIs should be expanded into a key/value parameters.void
setDurationMaxAction
(String durationMaxAction) Controls whether the Camel application should shutdown the JVM, or stop all routes, when duration max is triggered.void
setDurationMaxIdleSeconds
(int durationMaxIdleSeconds) To specify for how long time in seconds Camel can be idle before automatic terminating the JVM.void
setDurationMaxMessages
(int durationMaxMessages) To specify how many messages to process by Camel before automatic terminating the JVM.void
setDurationMaxSeconds
(int durationMaxSeconds) To specify for how long time in seconds to keep running the JVM before automatic terminating the JVM.void
setEndpointBridgeErrorHandler
(boolean endpointBridgeErrorHandler) Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler.void
setEndpointLazyStartProducer
(boolean endpointLazyStartProducer) Whether the producer should be started lazy (on the first message).void
setEndpointRuntimeStatisticsEnabled
(boolean endpointRuntimeStatisticsEnabled) Sets whether endpoint runtime statistics is enabled (gathers runtime usage of each incoming and outgoing endpoints).void
setExchangeFactory
(String exchangeFactory) Controls whether to pool (reuse) exchanges or create new exchanges (prototype).void
setExchangeFactoryCapacity
(int exchangeFactoryCapacity) The capacity the pool (for each consumer) uses for storing exchanges.void
setExchangeFactoryStatisticsEnabled
(boolean exchangeFactoryStatisticsEnabled) Configures whether statistics is enabled on exchange factory.void
setFileConfigurations
(String fileConfigurations) Directory to load additional configuration files that contains configuration values that takes precedence over any other configuration.void
setGlobalOptions
(Map<String, String> globalOptions) Sets global options that can be referenced in the camel contextvoid
setInflightRepositoryBrowseEnabled
(boolean inflightRepositoryBrowseEnabled) Sets whether the inflight repository should allow browsing each inflight exchange.void
setJavaRoutesExcludePattern
(String javaRoutesExcludePattern) Used for exclusive filtering RouteBuilder classes which are collected from the registry or via classpath scanning.void
setJavaRoutesIncludePattern
(String javaRoutesIncludePattern) Used for inclusive filtering RouteBuilder classes which are collected from the registry or via classpath scanning.void
setJmxEnabled
(boolean jmxEnabled) Enable JMX in your Camel application.void
setJmxManagementMBeansLevel
(org.apache.camel.ManagementMBeansLevel jmxManagementMBeansLevel) Sets the mbeans registration level.void
setJmxManagementNamePattern
(String jmxManagementNamePattern) The naming pattern for creating the CamelContext JMX management name.void
setJmxManagementRegisterRoutesCreateByKamelet
(boolean jmxManagementRegisterRoutesCreateByKamelet) Whether routes created by Kamelets should be registered for JMX management.void
setJmxManagementRegisterRoutesCreateByTemplate
(boolean jmxManagementRegisterRoutesCreateByTemplate) Whether routes created by route templates (not Kamelets) should be registered for JMX management.void
setJmxManagementStatisticsLevel
(org.apache.camel.ManagementStatisticsLevel jmxManagementStatisticsLevel) Sets the JMX statistics level, the level can be set to Extended to gather additional information The default value is Default.void
setJmxUpdateRouteEnabled
(boolean jmxUpdateRouteEnabled) Whether to allow updating routes at runtime via JMX using the ManagedRouteMBean.void
setLightweight
(boolean lightweight) Configure the context to be lightweight.void
setLoadHealthChecks
(boolean loadHealthChecks) Whether to load custom health checks by scanning classpath.void
setLoadStatisticsEnabled
(boolean loadStatisticsEnabled) Sets whether context load statistics is enabled (something like the unix load average).void
setLoadTypeConverters
(boolean loadTypeConverters) Whether to load custom type converters by scanning classpath.void
setLogDebugMaxChars
(int logDebugMaxChars) Is used to limit the maximum length of the logging Camel message bodies.void
setLogExhaustedMessageBody
(boolean logExhaustedMessageBody) Sets whether to log exhausted message body with message history.void
setLogMask
(boolean logMask) Sets whether log mask is enabled or not.void
setMdcLoggingKeysPattern
(String mdcLoggingKeysPattern) Sets the pattern used for determine which custom MDC keys to propagate during message routing when the routing engine continues routing asynchronously for the given message.void
setMessageHistory
(boolean messageHistory) Sets whether message history is enabled or not.void
setModeline
(boolean modeline) Whether camel-k style modeline is also enabled when not using camel-k.void
Sets the name of the CamelContext.void
setProducerTemplateCacheSize
(int producerTemplateCacheSize) Producer template endpoints cache size.void
setRouteFilterExcludePattern
(String exclude) Used for filtering routes routes matching the given pattern, which follows the following rules: - Match by route id - Match by route input endpoint uri The matching is using exact match, by wildcard and regular expression as documented byPatternHelper.matchPattern(String, String)
.void
setRouteFilterIncludePattern
(String include) Used for filtering routes matching the given pattern, which follows the following rules: - Match by route id - Match by route input endpoint uri The matching is using exact match, by wildcard and regular expression as documented byPatternHelper.matchPattern(String, String)
.void
setRoutesCollectorEnabled
(boolean routesCollectorEnabled) Whether the routes collector is enabled or not.void
setRoutesCollectorIgnoreLoadingError
(boolean routesCollectorIgnoreLoadingError) Whether the routes collector should ignore any errors during loading and compiling routes.void
setRoutesExcludePattern
(String routesExcludePattern) Used for exclusive filtering of routes from directories.void
setRoutesIncludePattern
(String routesIncludePattern) Used for inclusive filtering of routes from directories.void
setRoutesReloadDirectory
(String routesReloadDirectory) Directory to scan for route changes.void
setRoutesReloadDirectoryRecursive
(boolean routesReloadDirectoryRecursive) Whether the directory to scan should include sub directories.void
setRoutesReloadEnabled
(boolean routesReloadEnabled) Used for enabling automatic routes reloading.void
setRoutesReloadPattern
(String routesReloadPattern) Used for inclusive filtering of routes from directories.void
setRoutesReloadRemoveAllRoutes
(boolean routesReloadRemoveAllRoutes) When reloading routes should all existing routes be stopped and removed.void
setRoutesReloadRestartDuration
(boolean routesReloadRestartDuration) Whether to restart max duration when routes are reloaded.void
setShutdownLogInflightExchangesOnTimeout
(boolean shutdownLogInflightExchangesOnTimeout) Sets whether to log information about the inflight Exchanges which are still running during a shutdown which didn't complete without the given timeout.void
setShutdownNowOnTimeout
(boolean shutdownNowOnTimeout) Sets whether to force shutdown of all consumers when a timeout occurred and thus not all consumers was shutdown within that period.void
setShutdownRoutesInReverseOrder
(boolean shutdownRoutesInReverseOrder) Sets whether routes should be shutdown in reverse or the same order as they were started.void
setShutdownSuppressLoggingOnTimeout
(boolean shutdownSuppressLoggingOnTimeout) Whether Camel should try to suppress logging during shutdown and timeout was triggered, meaning forced shutdown is happening.void
setShutdownTimeout
(int shutdownTimeout) Timeout in seconds to graceful shutdown all the Camel routes.void
setSourceLocationEnabled
(boolean sourceLocationEnabled) Whether to capture precise source location:line-number for all EIPs in Camel routes.void
setStartupRecorder
(String startupRecorder) To use startup recorder for capturing execution time during starting Camel.void
setStartupRecorderDir
(String startupRecorderDir) Directory to store the recording.void
setStartupRecorderDuration
(long startupRecorderDuration) How long time to run the startup recorder.void
setStartupRecorderMaxDepth
(int startupRecorderMaxDepth) To filter our sub steps at a maximum depth.void
setStartupRecorderProfile
(String startupRecorderProfile) To use a specific Java Flight Recorder profile configuration, such as default or profile.void
setStartupRecorderRecording
(boolean startupRecorderRecording) To enable Java Flight Recorder to start a recording and automatic dump the recording to disk after startup is complete.void
setStartupSummaryLevel
(org.apache.camel.StartupSummaryLevel startupSummaryLevel) Controls the level of information logged during startup (and shutdown) of CamelContext.void
setStreamCachingAllowClasses
(String streamCachingAllowClasses) To filter stream caching of a given set of allowed/denied classes.void
setStreamCachingAnySpoolRules
(boolean streamCachingAnySpoolRules) Sets whether if just any of the org.apache.camel.spi.StreamCachingStrategy.SpoolRule rules returns true then shouldSpoolCache(long) returns true, to allow spooling to disk.void
setStreamCachingBufferSize
(int streamCachingBufferSize) Sets the stream caching buffer size to use when allocating in-memory buffers used for in-memory stream caches.void
setStreamCachingDenyClasses
(String streamCachingDenyClasses) To filter stream caching of a given set of allowed/denied classes.void
setStreamCachingEnabled
(boolean streamCachingEnabled) Sets whether stream caching is enabled or not.void
setStreamCachingRemoveSpoolDirectoryWhenStopping
(boolean streamCachingRemoveSpoolDirectoryWhenStopping) Whether to remove stream caching temporary directory when stopping.void
setStreamCachingSpoolCipher
(String streamCachingSpoolCipher) Sets a stream caching cipher name to use when spooling to disk to write with encryption.void
setStreamCachingSpoolDirectory
(String streamCachingSpoolDirectory) Sets the stream caching spool (temporary) directory to use for overflow and spooling to disk.void
setStreamCachingSpoolEnabled
(boolean streamCachingSpoolEnabled) To enable stream caching spooling to disk.void
setStreamCachingSpoolThreshold
(long streamCachingSpoolThreshold) Stream caching threshold in bytes when overflow to disk is activated.void
setStreamCachingSpoolUsedHeapMemoryLimit
(String streamCachingSpoolUsedHeapMemoryLimit) Sets what the upper bounds should be when streamCachingSpoolUsedHeapMemoryThreshold is in use.void
setStreamCachingSpoolUsedHeapMemoryThreshold
(int streamCachingSpoolUsedHeapMemoryThreshold) Sets a percentage (1-99) of used heap memory threshold to activate stream caching spooling to disk.void
setStreamCachingStatisticsEnabled
(boolean streamCachingStatisticsEnabled) Sets whether stream caching statistics is enabled.void
setThreadNamePattern
(String threadNamePattern) Sets the thread name pattern used for creating the full thread name.void
setTracing
(boolean tracing) Sets whether tracing is enabled or not.void
setTracingLoggingFormat
(String format) To use a custom tracing logging format.void
setTracingPattern
(String tracingPattern) Tracing pattern to match which node EIPs to trace.void
setTracingStandby
(boolean tracingStandby) Whether to set tracing on standby.void
setTracingTemplates
(boolean tracingTemplates) Whether tracing should trace inner details from route templates (or kamelets).void
setTypeConverterStatisticsEnabled
(boolean typeConverterStatisticsEnabled) Sets whether type converter statistics is enabled.void
setUseBreadcrumb
(boolean useBreadcrumb) Set whether breadcrumb is enabled.void
setUseDataType
(boolean useDataType) Whether to enable using data type on Camel messages.void
setUseMdcLogging
(boolean useMdcLogging) To turn on MDC loggingvoid
setUuidGenerator
(String uuidGenerator) UUID generator to use.withAllowUseOriginalMessage
(boolean allowUseOriginalMessage) Sets whether to allow access to the original message from Camel's error handler, or from org.apache.camel.spi.UnitOfWork.getOriginalInMessage().withAutoStartup
(boolean autoStartup) Sets whether the object should automatically start when Camel starts.withBeanIntrospectionExtendedStatistics
(boolean beanIntrospectionExtendedStatistics) Sets whether bean introspection uses extended statistics.withBeanIntrospectionLoggingLevel
(org.apache.camel.LoggingLevel beanIntrospectionLoggingLevel) Sets the logging level used by bean introspection, logging activity of its usage.withBeanPostProcessorEnabled
(boolean beanPostProcessorEnabled) Can be used to turn off bean post processing.withCamelEventsTimestampEnabled
(boolean camelEventsTimestampEnabled) Whether to include timestamps for all emitted Camel Events.withCaseInsensitiveHeaders
(boolean caseInsensitiveHeaders) Whether to use case sensitive or insensitive headers.withCompileWorkDir
(String compileWorkDir) Work directory for compiler.withConsumerTemplateCacheSize
(int consumerTemplateCacheSize) Consumer template endpoints cache size.withContextReloadEnabled
(boolean contextReloadEnabled) Used for enabling context reloading.withDescription
(String description) Sets the description (intended for humans) of the Camel application.withDevConsoleEnabled
(boolean devConsoleEnabled) Whether to enable developer console (requires camel-console on classpath).withDumpRoutes
(String dumpRoutes) If dumping is enabled then Camel will during startup dump all loaded routes (incl rests and route templates) represented as XML/YAML DSL into the log.withDumpRoutesGeneratedIds
(boolean dumpRoutesGeneratedIds) Whether to include auto generated IDs in the dumped output.withDumpRoutesInclude
(String dumpRoutesInclude) Controls what to include in output for route dumping.withDumpRoutesLog
(boolean dumpRoutesLog) Whether to log route dumps to LoggerwithDumpRoutesOutput
(String dumpRoutesOutput) Whether to save route dumps to an output file.withDumpRoutesResolvePlaceholders
(boolean dumpRoutesResolvePlaceholders) Whether to resolve property placeholders in the dumped output.withDumpRoutesUriAsParameters
(boolean dumpRoutesUriAsParameters) When dumping routes to YAML format, then this option controls whether endpoint URIs should be expanded into a key/value parameters.withDurationMaxAction
(String durationMaxAction) Controls whether the Camel application should shutdown the JVM, or stop all routes, when duration max is triggered.withDurationMaxIdleSeconds
(int durationMaxIdleSeconds) To specify for how long time in seconds Camel can be idle before automatic terminating the JVM.withDurationMaxMessages
(int durationMaxMessages) To specify how many messages to process by Camel before automatic terminating the JVM.withDurationMaxSeconds
(int durationMaxSeconds) To specify for how long time in seconds to keep running the JVM before automatic terminating the JVM.withEndpointBridgeErrorHandler
(boolean endpointBridgeErrorHandler) Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler.withEndpointLazyStartProducer
(boolean endpointLazyStartProducer) Whether the producer should be started lazy (on the first message).withEndpointRuntimeStatisticsEnabled
(boolean endpointRuntimeStatisticsEnabled) Sets whether endpoint runtime statistics is enabled (gathers runtime usage of each incoming and outgoing endpoints).withExchangeFactory
(String exchangeFactory) Controls whether to pool (reuse) exchanges or create new fresh exchanges (default).withExchangeFactoryCapacity
(int exchangeFactoryCapacity) The capacity the pool (for each consumer) uses for storing exchanges.withExchangeFactoryStatisticsEnabled
(boolean exchangeFactoryStatisticsEnabled) Configures whether statistics is enabled on exchange factory.withFileConfigurations
(String fileConfigurations) Directory to load additional configuration files that contains configuration values that takes precedence over any other configuration.withGlobalOption
(String key, String value) Sets global options that can be referenced in the camel contextwithGlobalOptions
(Map<String, String> globalOptions) Sets global options that can be referenced in the camel contextwithInflightRepositoryBrowseEnabled
(boolean inflightRepositoryBrowseEnabled) Sets whether the inflight repository should allow browsing each inflight exchange.withJavaRoutesExcludePattern
(String javaRoutesExcludePattern) Used for exclusive filtering component scanning of RouteBuilder classes with @Component annotation.withJavaRoutesIncludePattern
(String javaRoutesIncludePattern) Used for inclusive filtering component scanning of RouteBuilder classes with @Component annotation.withJmxEnabled
(boolean jmxEnabled) Enable JMX in your Camel application.withJmxManagementMBeansLevel
(org.apache.camel.ManagementMBeansLevel jmxManagementMBeansLevel) Sets the mbeans registration level.withJmxManagementNamePattern
(String jmxManagementNamePattern) The naming pattern for creating the CamelContext JMX management name.withJmxManagementRegisterRoutesCreateByKamelet
(boolean jmxManagementRegisterRoutesCreateByKamelet) Whether routes created by Kamelets should be registered for JMX management.withJmxManagementRegisterRoutesCreateByTemplate
(boolean jmxManagementRegisterRoutesCreateByTemplate) Whether routes created by route templates (not Kamelets) should be registered for JMX management.withJmxManagementStatisticsLevel
(org.apache.camel.ManagementStatisticsLevel jmxManagementStatisticsLevel) Sets the JMX statistics level The level can be set to Extended to gather additional information The default value is Default.withLightweight
(boolean lightweight) Configure the context to be lightweight.withLoadHealthChecks
(boolean loadHealthChecks) Whether to load custom health checks by scanning classpath.withLoadStatisticsEnabled
(boolean loadStatisticsEnabled) Sets whether context load statistics is enabled (something like the unix load average).withLoadTypeConverters
(boolean loadTypeConverters) Whether to load custom type converters by scanning classpath.withLogDebugMaxChars
(int logDebugMaxChars) Is used to limit the maximum length of the logging Camel message bodies.withLogExhaustedMessageBody
(boolean logExhaustedMessageBody) Sets whether to log exhausted message body with message history.withLogMask
(boolean logMask) Sets whether log mask is enabled or not.withMdcLoggingKeysPattern
(String mdcLoggingKeysPattern) Sets the pattern used for determine which custom MDC keys to propagate during message routing when the routing engine continues routing asynchronously for the given message.withMessageHistory
(boolean messageHistory) Sets whether message history is enabled or not.withModeline
(boolean modeline) Whether camel-k style modeline is also enabled when not using camel-k.Sets the name of the CamelContext.withProducerTemplateCacheSize
(int producerTemplateCacheSize) Producer template endpoints cache size.withRouteFilterExcludePattern
(String routeFilterExcludePattern) Used for filtering routes routes matching the given pattern, which follows the following rules: - Match by route id - Match by route input endpoint uri The matching is using exact match, by wildcard and regular expression as documented byPatternHelper.matchPattern(String, String)
.withRouteFilterIncludePattern
(String routeFilterIncludePattern) Used for filtering routes routes matching the given pattern, which follows the following rules: - Match by route id - Match by route input endpoint uri The matching is using exact match, by wildcard and regular expression as documented byPatternHelper.matchPattern(String, String)
.withRoutesCollectorEnabled
(boolean routesCollectorEnabled) Whether the routes collector is enabled or not.withRoutesCollectorIgnoreLoadingError
(boolean routesCollectorIgnoreLoadingError) Whether the routes collector should ignore any errors during loading and compiling routes.withRoutesExcludePattern
(String routesExcludePattern) Used for exclusive filtering of routes from directories.withRoutesIncludePattern
(String routesIncludePattern) Used for inclusive filtering of routes from directories.withRoutesReloadDirectory
(String routesReloadDirectory) Directory to scan (incl subdirectories) for route changes.withRoutesReloadDirectoryRecursive
(boolean routesReloadDirectoryRecursive) Whether the directory to scan should include sub directories.withRoutesReloadEnabled
(boolean routesReloadEnabled) Used for enabling automatic routes reloading.withRoutesReloadPattern
(String routesReloadPattern) Used for inclusive filtering of routes from directories.withRoutesReloadRemoveAllRoutes
(boolean routesReloadRemoveAllRoutes) When reloading routes should all existing routes be stopped and removed.withRoutesReloadRestartDuration
(boolean routesReloadRestartDuration) Whether to restart max duration when routes are reloaded.withShutdownLogInflightExchangesOnTimeout
(boolean shutdownLogInflightExchangesOnTimeout) Sets whether to log information about the inflight Exchanges which are still running during a shutdown which didn't complete without the given timeout.withShutdownNowOnTimeout
(boolean shutdownNowOnTimeout) Sets whether to force shutdown of all consumers when a timeout occurred and thus not all consumers was shutdown within that period.withShutdownRoutesInReverseOrder
(boolean shutdownRoutesInReverseOrder) Sets whether routes should be shutdown in reverse or the same order as they where started.withShutdownSuppressLoggingOnTimeout
(boolean shutdownSuppressLoggingOnTimeout) Whether Camel should try to suppress logging during shutdown and timeout was triggered, meaning forced shutdown is happening.withShutdownTimeout
(int shutdownTimeout) Timeout in seconds to graceful shutdown all the Camel routes.withSourceLocationEnabled
(boolean sourceLocationEnabled) Whether to capture precise source location:line-number for all EIPs in Camel routes.withStartupRecorder
(String startupRecorder) To use startup recorder for capturing execution time during starting Camel.withStartupRecorderDir
(String startupRecorderDir) Directory to store the recording.withStartupRecorderDuration
(long startupRecorderDuration) How long time to run the startup recorder.withStartupRecorderMaxDepth
(int startupRecorderMaxDepth) To filter our sub steps at a maximum depth.withStartupRecorderProfile
(String startupRecorderProfile) To use a specific Java Flight Recorder profile configuration, such as default or profile.withStartupRecorderRecording
(boolean startupRecorderRecording) To enable Java Flight Recorder to start a recording and automatic dump the recording to disk after startup is complete.withStreamCachingAllowClasses
(String streamCachingAllowClasses) To filter stream caching of a given set of allowed/denied classes.withStreamCachingAnySpoolRules
(boolean streamCachingAnySpoolRules) Sets whether if just any of the org.apache.camel.spi.StreamCachingStrategy.SpoolRule rules returns true then shouldSpoolCache(long) returns true, to allow spooling to disk.withStreamCachingBufferSize
(int streamCachingBufferSize) Sets the stream caching buffer size to use when allocating in-memory buffers used for in-memory stream caches.withStreamCachingDenyClasses
(String streamCachingDenyClasses) To filter stream caching of a given set of allowed/denied classes.withStreamCachingEnabled
(boolean streamCachingEnabled) Sets whether stream caching is enabled or not.withStreamCachingRemoveSpoolDirectoryWhenStopping
(boolean streamCachingRemoveSpoolDirectoryWhenStopping) Whether to remove stream caching temporary directory when stopping.withStreamCachingSpoolCipher
(String streamCachingSpoolCipher) Sets a stream caching cipher name to use when spooling to disk to write with encryption.withStreamCachingSpoolDirectory
(String streamCachingSpoolDirectory) Sets the stream caching spool (temporary) directory to use for overflow and spooling to disk.withStreamCachingSpoolEnabled
(boolean streamCachingSpoolEnabled) To enable stream caching spooling to disk.withStreamCachingSpoolThreshold
(long streamCachingSpoolThreshold) Stream caching threshold in bytes when overflow to disk is activated.withStreamCachingSpoolUsedHeapMemoryLimit
(String streamCachingSpoolUsedHeapMemoryLimit) Sets what the upper bounds should be when streamCachingSpoolUsedHeapMemoryThreshold is in use.withStreamCachingSpoolUsedHeapMemoryThreshold
(int streamCachingSpoolUsedHeapMemoryThreshold) Sets a percentage (1-99) of used heap memory threshold to activate stream caching spooling to disk.withStreamCachingStatisticsEnabled
(boolean streamCachingStatisticsEnabled) Sets whether stream caching statistics is enabled.withThreadNamePattern
(String threadNamePattern) Sets the thread name pattern used for creating the full thread name.withTracing
(boolean tracing) Sets whether tracing is enabled or not.withTracingLoggingFormat
(String format) To use a custom tracing logging format.withTracingPattern
(String tracingPattern) Tracing pattern to match which node EIPs to trace.withTracingStandby
(boolean tracingStandby) Whether to set tracing on standby.withTracingTemplates
(boolean tracingTemplates) Whether tracing should trace inner details from route templates (or kamelets).withTypeConverterStatisticsEnabled
(boolean typeConverterStatisticsEnabled) Sets whether type converter statistics is enabled.withUseBreadcrumb
(boolean useBreadcrumb) Set whether breadcrumb is enabled.withUseDataType
(boolean useDataType) Whether to enable using data type on Camel messages.withUseMdcLogging
(boolean useMdcLogging) To turn on MDC logging
-
Constructor Details
-
DefaultConfigurationProperties
public DefaultConfigurationProperties()
-
-
Method Details
-
getName
-
setName
Sets the name of the CamelContext. -
getDescription
-
setDescription
Sets the description (intended for humans) of the Camel application. -
getStartupSummaryLevel
public org.apache.camel.StartupSummaryLevel getStartupSummaryLevel() -
setStartupSummaryLevel
public void setStartupSummaryLevel(org.apache.camel.StartupSummaryLevel startupSummaryLevel) Controls the level of information logged during startup (and shutdown) of CamelContext. -
getDurationMaxSeconds
public int getDurationMaxSeconds() -
setDurationMaxSeconds
public void setDurationMaxSeconds(int durationMaxSeconds) To specify for how long time in seconds to keep running the JVM before automatic terminating the JVM. You can use this to run Camel for a short while. -
getDurationMaxIdleSeconds
public int getDurationMaxIdleSeconds() -
setDurationMaxIdleSeconds
public void setDurationMaxIdleSeconds(int durationMaxIdleSeconds) To specify for how long time in seconds Camel can be idle before automatic terminating the JVM. You can use this to run Camel for a short while. -
getDurationMaxMessages
public int getDurationMaxMessages() -
setDurationMaxMessages
public void setDurationMaxMessages(int durationMaxMessages) To specify how many messages to process by Camel before automatic terminating the JVM. You can use this to run Camel for a short while. -
getDurationMaxAction
-
setDurationMaxAction
Controls whether the Camel application should shutdown the JVM, or stop all routes, when duration max is triggered. -
getShutdownTimeout
public int getShutdownTimeout() -
setShutdownTimeout
public void setShutdownTimeout(int shutdownTimeout) Timeout in seconds to graceful shutdown all the Camel routes. -
isShutdownSuppressLoggingOnTimeout
public boolean isShutdownSuppressLoggingOnTimeout() -
setShutdownSuppressLoggingOnTimeout
public void setShutdownSuppressLoggingOnTimeout(boolean shutdownSuppressLoggingOnTimeout) Whether Camel should try to suppress logging during shutdown and timeout was triggered, meaning forced shutdown is happening. And during forced shutdown we want to avoid logging errors/warnings et all in the logs as a side-effect of the forced timeout. Notice the suppress is a best effort as there may still be some logs coming from 3rd party libraries and whatnot, which Camel cannot control. This option is default false. -
isShutdownNowOnTimeout
public boolean isShutdownNowOnTimeout() -
setShutdownNowOnTimeout
public void setShutdownNowOnTimeout(boolean shutdownNowOnTimeout) Sets whether to force shutdown of all consumers when a timeout occurred and thus not all consumers was shutdown within that period. You should have good reasons to set this option to false as it means that the routes keep running and is halted abruptly when CamelContext has been shutdown. -
isShutdownRoutesInReverseOrder
public boolean isShutdownRoutesInReverseOrder() -
setShutdownRoutesInReverseOrder
public void setShutdownRoutesInReverseOrder(boolean shutdownRoutesInReverseOrder) Sets whether routes should be shutdown in reverse or the same order as they were started. -
isShutdownLogInflightExchangesOnTimeout
public boolean isShutdownLogInflightExchangesOnTimeout() -
setShutdownLogInflightExchangesOnTimeout
public void setShutdownLogInflightExchangesOnTimeout(boolean shutdownLogInflightExchangesOnTimeout) Sets whether to log information about the inflight Exchanges which are still running during a shutdown which didn't complete without the given timeout. This requires to enable the option inflightRepositoryBrowseEnabled. -
isInflightRepositoryBrowseEnabled
public boolean isInflightRepositoryBrowseEnabled() -
setInflightRepositoryBrowseEnabled
public void setInflightRepositoryBrowseEnabled(boolean inflightRepositoryBrowseEnabled) Sets whether the inflight repository should allow browsing each inflight exchange. This is by default disabled as there is a very slight performance overhead when enabled. -
getFileConfigurations
-
setFileConfigurations
Directory to load additional configuration files that contains configuration values that takes precedence over any other configuration. This can be used to refer to files that may have secret configuration that has been mounted on the file system for containers. You can specify a pattern to load from sub directories and a name pattern such as /var/app/secret/*.properties, multiple directories can be separated by comma. -
isJmxEnabled
public boolean isJmxEnabled() -
setJmxEnabled
public void setJmxEnabled(boolean jmxEnabled) Enable JMX in your Camel application. -
getUuidGenerator
-
setUuidGenerator
UUID generator to use. default (32 bytes), short (16 bytes), classic (32 bytes or longer), simple (long incrementing counter), off (turned off for exchanges - only intended for performance profiling) -
getProducerTemplateCacheSize
public int getProducerTemplateCacheSize() -
setProducerTemplateCacheSize
public void setProducerTemplateCacheSize(int producerTemplateCacheSize) Producer template endpoints cache size. -
getConsumerTemplateCacheSize
public int getConsumerTemplateCacheSize() -
setConsumerTemplateCacheSize
public void setConsumerTemplateCacheSize(int consumerTemplateCacheSize) Consumer template endpoints cache size. -
isLoadTypeConverters
public boolean isLoadTypeConverters() -
setLoadTypeConverters
public void setLoadTypeConverters(boolean loadTypeConverters) Whether to load custom type converters by scanning classpath. This is used for backwards compatibility with Camel 2.x. Its recommended to migrate to use fast type converter loading by setting @Converter(loader = true) on your custom type converter classes. -
isLoadHealthChecks
public boolean isLoadHealthChecks() -
setLoadHealthChecks
public void setLoadHealthChecks(boolean loadHealthChecks) Whether to load custom health checks by scanning classpath. -
isDevConsoleEnabled
public boolean isDevConsoleEnabled() -
setDevConsoleEnabled
public void setDevConsoleEnabled(boolean devConsoleEnabled) Whether to enable developer console (requires camel-console on classpath). The developer console is only for assisting during development. This is NOT for production usage. -
isModeline
public boolean isModeline() -
setModeline
public void setModeline(boolean modeline) Whether camel-k style modeline is also enabled when not using camel-k. Enabling this allows to use a camel-k like experience by being able to configure various settings using modeline directly in your route source code. -
getLogDebugMaxChars
public int getLogDebugMaxChars() -
setLogDebugMaxChars
public void setLogDebugMaxChars(int logDebugMaxChars) Is used to limit the maximum length of the logging Camel message bodies. If the message body is longer than the limit, the log message is clipped. Use -1 to have unlimited length. Use for example 1000 to log at most 1000 characters. -
isStreamCachingEnabled
public boolean isStreamCachingEnabled() -
setStreamCachingEnabled
public void setStreamCachingEnabled(boolean streamCachingEnabled) Sets whether stream caching is enabled or not. While stream types (like StreamSource, InputStream and Reader) are commonly used in messaging for performance reasons, they also have an important drawback: they can only be read once. In order to be able to work with message content multiple times, the stream needs to be cached. Streams are cached in memory only (by default). If streamCachingSpoolEnabled=true, then, for large stream messages (over 128 KB by default) will be cached in a temporary file instead, and Camel will handle deleting the temporary file once the cached stream is no longer necessary. Default is true. -
getStreamCachingAllowClasses
-
setStreamCachingAllowClasses
To filter stream caching of a given set of allowed/denied classes. By default, all classes that areInputStream
is allowed. Multiple class names can be separated by comma. -
getStreamCachingDenyClasses
-
setStreamCachingDenyClasses
To filter stream caching of a given set of allowed/denied classes. By default, all classes that areInputStream
is allowed. Multiple class names can be separated by comma. -
isStreamCachingSpoolEnabled
public boolean isStreamCachingSpoolEnabled() -
setStreamCachingSpoolEnabled
public void setStreamCachingSpoolEnabled(boolean streamCachingSpoolEnabled) To enable stream caching spooling to disk. This means, for large stream messages (over 128 KB by default) will be cached in a temporary file instead, and Camel will handle deleting the temporary file once the cached stream is no longer necessary. Default is false. -
getStreamCachingSpoolDirectory
-
setStreamCachingSpoolDirectory
Sets the stream caching spool (temporary) directory to use for overflow and spooling to disk. If no spool directory has been explicit configured, then a temporary directory is created in the java.io.tmpdir directory. -
getStreamCachingSpoolCipher
-
setStreamCachingSpoolCipher
Sets a stream caching cipher name to use when spooling to disk to write with encryption. By default the data is not encrypted. -
getStreamCachingSpoolThreshold
public long getStreamCachingSpoolThreshold() -
setStreamCachingSpoolThreshold
public void setStreamCachingSpoolThreshold(long streamCachingSpoolThreshold) Stream caching threshold in bytes when overflow to disk is activated. The default threshold is 128kb. Use -1 to disable overflow to disk. -
getStreamCachingSpoolUsedHeapMemoryThreshold
public int getStreamCachingSpoolUsedHeapMemoryThreshold() -
setStreamCachingSpoolUsedHeapMemoryThreshold
public void setStreamCachingSpoolUsedHeapMemoryThreshold(int streamCachingSpoolUsedHeapMemoryThreshold) Sets a percentage (1-99) of used heap memory threshold to activate stream caching spooling to disk. -
getStreamCachingSpoolUsedHeapMemoryLimit
-
setStreamCachingSpoolUsedHeapMemoryLimit
Sets what the upper bounds should be when streamCachingSpoolUsedHeapMemoryThreshold is in use. -
isStreamCachingAnySpoolRules
public boolean isStreamCachingAnySpoolRules() -
setStreamCachingAnySpoolRules
public void setStreamCachingAnySpoolRules(boolean streamCachingAnySpoolRules) Sets whether if just any of the org.apache.camel.spi.StreamCachingStrategy.SpoolRule rules returns true then shouldSpoolCache(long) returns true, to allow spooling to disk. If this option is false, then all the org.apache.camel.spi.StreamCachingStrategy.SpoolRule must return true. The default value is false which means that all the rules must return true. -
getStreamCachingBufferSize
public int getStreamCachingBufferSize() -
setStreamCachingBufferSize
public void setStreamCachingBufferSize(int streamCachingBufferSize) Sets the stream caching buffer size to use when allocating in-memory buffers used for in-memory stream caches. The default size is 4096. -
isStreamCachingRemoveSpoolDirectoryWhenStopping
public boolean isStreamCachingRemoveSpoolDirectoryWhenStopping() -
setStreamCachingRemoveSpoolDirectoryWhenStopping
public void setStreamCachingRemoveSpoolDirectoryWhenStopping(boolean streamCachingRemoveSpoolDirectoryWhenStopping) Whether to remove stream caching temporary directory when stopping. This option is default true. -
isStreamCachingStatisticsEnabled
public boolean isStreamCachingStatisticsEnabled() -
setStreamCachingStatisticsEnabled
public void setStreamCachingStatisticsEnabled(boolean streamCachingStatisticsEnabled) Sets whether stream caching statistics is enabled. -
isTypeConverterStatisticsEnabled
public boolean isTypeConverterStatisticsEnabled() -
setTypeConverterStatisticsEnabled
public void setTypeConverterStatisticsEnabled(boolean typeConverterStatisticsEnabled) Sets whether type converter statistics is enabled. By default the type converter utilization statistics is disabled. Notice: If enabled then there is a slight performance impact under very heavy load. -
isTracing
public boolean isTracing() -
setTracing
public void setTracing(boolean tracing) Sets whether tracing is enabled or not. Default is false. -
isTracingStandby
public boolean isTracingStandby() -
setTracingStandby
public void setTracingStandby(boolean tracingStandby) Whether to set tracing on standby. If on standby then the tracer is installed and made available. Then the tracer can be enabled later at runtime via JMX or viaTracer.setEnabled(boolean)
. -
isTracingTemplates
public boolean isTracingTemplates() -
setTracingTemplates
public void setTracingTemplates(boolean tracingTemplates) Whether tracing should trace inner details from route templates (or kamelets). Turning this on increases the verbosity of tracing by including events from internal routes in the templates or kamelets. Default is false. -
getTracingPattern
-
setTracingPattern
Tracing pattern to match which node EIPs to trace. For example to match all To EIP nodes, use to*. The pattern matches by node and route id's Multiple patterns can be separated by comma. -
getTracingLoggingFormat
-
setTracingLoggingFormat
To use a custom tracing logging format. The default format (arrow, routeId, label) is: %-4.4s [%-12.12s] [%-33.33s] -
isMessageHistory
public boolean isMessageHistory() -
setMessageHistory
public void setMessageHistory(boolean messageHistory) Sets whether message history is enabled or not. Default is false. -
isSourceLocationEnabled
public boolean isSourceLocationEnabled() -
setSourceLocationEnabled
public void setSourceLocationEnabled(boolean sourceLocationEnabled) Whether to capture precise source location:line-number for all EIPs in Camel routes. Enabling this will impact parsing Java based routes (also Groovy, Kotlin, etc.) on startup as this uses JDK StackTraceElement to calculate the location from the Camel route, which comes with a performance cost. This only impact startup, not the performance of the routes at runtime. -
isLogMask
public boolean isLogMask() -
setLogMask
public void setLogMask(boolean logMask) Sets whether log mask is enabled or not. Default is false. -
isLogExhaustedMessageBody
public boolean isLogExhaustedMessageBody() -
setLogExhaustedMessageBody
public void setLogExhaustedMessageBody(boolean logExhaustedMessageBody) Sets whether to log exhausted message body with message history. Default is false. -
isAutoStartup
public boolean isAutoStartup() -
setAutoStartup
public void setAutoStartup(boolean autoStartup) Sets whether the object should automatically start when Camel starts. Important: Currently only routes can be disabled, as CamelContext's are always started. Note: When setting auto startup false on CamelContext then that takes precedence and no routes are started. You would need to start CamelContext explicit using the org.apache.camel.CamelContext.start() method, to start the context, and then you would need to start the routes manually using CamelContext.getRouteController().startRoute(String). Default is true to always start up. -
isAllowUseOriginalMessage
public boolean isAllowUseOriginalMessage() -
setAllowUseOriginalMessage
public void setAllowUseOriginalMessage(boolean allowUseOriginalMessage) Sets whether to allow access to the original message from Camel's error handler, or from org.apache.camel.spi.UnitOfWork.getOriginalInMessage(). Turning this off can optimize performance, as defensive copy of the original message is not needed. Default is false. -
isCaseInsensitiveHeaders
public boolean isCaseInsensitiveHeaders() -
setCaseInsensitiveHeaders
public void setCaseInsensitiveHeaders(boolean caseInsensitiveHeaders) Whether to use case sensitive or insensitive headers. Important: When using case sensitive (this is set to false). Then the map is case sensitive which means headers such as content-type and Content-Type are two different keys which can be a problem for some protocols such as HTTP based, which rely on case insensitive headers. However case sensitive implementations can yield faster performance. Therefore use case sensitive implementation with care. Default is true. -
isAutowiredEnabled
public boolean isAutowiredEnabled() -
setAutowiredEnabled
public void setAutowiredEnabled(boolean autowiredEnabled) Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. Default is true. -
isEndpointRuntimeStatisticsEnabled
public boolean isEndpointRuntimeStatisticsEnabled() -
setEndpointRuntimeStatisticsEnabled
public void setEndpointRuntimeStatisticsEnabled(boolean endpointRuntimeStatisticsEnabled) Sets whether endpoint runtime statistics is enabled (gathers runtime usage of each incoming and outgoing endpoints). The default value is false. -
isLoadStatisticsEnabled
public boolean isLoadStatisticsEnabled() -
setLoadStatisticsEnabled
public void setLoadStatisticsEnabled(boolean loadStatisticsEnabled) Sets whether context load statistics is enabled (something like the unix load average). The statistics requires to have camel-management on the classpath as JMX is required. The default value is false. -
isEndpointLazyStartProducer
public boolean isEndpointLazyStartProducer() -
setEndpointLazyStartProducer
public void setEndpointLazyStartProducer(boolean endpointLazyStartProducer) Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. The default value is false. -
isEndpointBridgeErrorHandler
public boolean isEndpointBridgeErrorHandler() -
setEndpointBridgeErrorHandler
public void setEndpointBridgeErrorHandler(boolean endpointBridgeErrorHandler) Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN/ERROR level and ignored. The default value is false. -
isUseDataType
public boolean isUseDataType() -
setUseDataType
public void setUseDataType(boolean useDataType) Whether to enable using data type on Camel messages. Data type are automatic turned on if one ore more routes has been explicit configured with input and output types. Otherwise data type is default off. -
isUseBreadcrumb
public boolean isUseBreadcrumb() -
setUseBreadcrumb
public void setUseBreadcrumb(boolean useBreadcrumb) Set whether breadcrumb is enabled. The default value is false. -
isBeanPostProcessorEnabled
public boolean isBeanPostProcessorEnabled() -
setBeanPostProcessorEnabled
public void setBeanPostProcessorEnabled(boolean beanPostProcessorEnabled) Can be used to turn off bean post processing. Be careful to turn this off, as this means that beans that use Camel annotations such asEndpointInject
,ProducerTemplate
,Produce
,Consume
etc will not be injected and in use. Turning this off should only be done if you are sure you do not use any of these Camel features. Not all runtimes allow turning this off (such as camel-blueprint or camel-cdi with XML). The default value is true (enabled). -
getJmxManagementMBeansLevel
public org.apache.camel.ManagementMBeansLevel getJmxManagementMBeansLevel() -
setJmxManagementMBeansLevel
public void setJmxManagementMBeansLevel(org.apache.camel.ManagementMBeansLevel jmxManagementMBeansLevel) Sets the mbeans registration level. The default value is Default. -
getJmxManagementStatisticsLevel
public org.apache.camel.ManagementStatisticsLevel getJmxManagementStatisticsLevel() -
setJmxManagementStatisticsLevel
public void setJmxManagementStatisticsLevel(org.apache.camel.ManagementStatisticsLevel jmxManagementStatisticsLevel) Sets the JMX statistics level, the level can be set to Extended to gather additional information The default value is Default. -
getJmxManagementNamePattern
-
setJmxManagementNamePattern
The naming pattern for creating the CamelContext JMX management name. The default pattern is #name# -
isJmxManagementRegisterRoutesCreateByKamelet
public boolean isJmxManagementRegisterRoutesCreateByKamelet() -
setJmxManagementRegisterRoutesCreateByKamelet
public void setJmxManagementRegisterRoutesCreateByKamelet(boolean jmxManagementRegisterRoutesCreateByKamelet) Whether routes created by Kamelets should be registered for JMX management. Enabling this allows to have fine-grained monitoring and management of every route created via Kamelets. This is default disabled as a Kamelet is intended as a component (black-box) and its implementation details as Camel route makes the overall management and monitoring of Camel applications more verbose. During development of Kamelets then enabling this will make it possible for developers to do fine-grained performance inspection and identify potential bottlenecks in the Kamelet routes. However, for production usage then keeping this disabled is recommended. -
isJmxManagementRegisterRoutesCreateByTemplate
public boolean isJmxManagementRegisterRoutesCreateByTemplate() -
setJmxManagementRegisterRoutesCreateByTemplate
public void setJmxManagementRegisterRoutesCreateByTemplate(boolean jmxManagementRegisterRoutesCreateByTemplate) Whether routes created by route templates (not Kamelets) should be registered for JMX management. Enabling this allows to have fine-grained monitoring and management of every route created via route templates. This is default enabled (unlike Kamelets) as routes created via templates is regarded as standard routes, and should be available for management and monitoring. -
isCamelEventsTimestampEnabled
public boolean isCamelEventsTimestampEnabled() -
setCamelEventsTimestampEnabled
public void setCamelEventsTimestampEnabled(boolean camelEventsTimestampEnabled) Whether to include timestamps for all emitted Camel Events. Enabling this allows to know fine-grained at what time each event was emitted, which can be used for reporting to report exactly the time of the events. This is by default false to avoid the overhead of including this information. -
isUseMdcLogging
public boolean isUseMdcLogging() -
setUseMdcLogging
public void setUseMdcLogging(boolean useMdcLogging) To turn on MDC logging -
getMdcLoggingKeysPattern
-
setMdcLoggingKeysPattern
Sets the pattern used for determine which custom MDC keys to propagate during message routing when the routing engine continues routing asynchronously for the given message. Setting this pattern to * will propagate all custom keys. Or setting the pattern to foo*,bar* will propagate any keys starting with either foo or bar. Notice that a set of standard Camel MDC keys are always propagated which starts with camel. as key name. The match rules are applied in this order (case insensitive): 1. exact match, returns true 2. wildcard match (pattern ends with a * and the name starts with the pattern), returns true 3. regular expression match, returns true 4. otherwise returns false -
getThreadNamePattern
-
setThreadNamePattern
Sets the thread name pattern used for creating the full thread name. The default pattern is: Camel (#camelId#) thread ##counter# - #name# Where #camelId# is the name of the CamelContext. and #counter# is a unique incrementing counter. and #name# is the regular thread name. You can also use #longName# which is the long thread name which can includes endpoint parameters etc. -
getRouteFilterIncludePattern
-
setRouteFilterIncludePattern
Used for filtering routes matching the given pattern, which follows the following rules: - Match by route id - Match by route input endpoint uri The matching is using exact match, by wildcard and regular expression as documented byPatternHelper.matchPattern(String, String)
. For example to only include routes which starts with foo in their route id's, use: include=foo* And to exclude routes which starts from JMS endpoints, use: exclude=jms:* Multiple patterns can be separated by comma, for example to exclude both foo and bar routes, use: exclude=foo*,bar* Exclude takes precedence over include. -
getRouteFilterExcludePattern
-
setRouteFilterExcludePattern
Used for filtering routes routes matching the given pattern, which follows the following rules: - Match by route id - Match by route input endpoint uri The matching is using exact match, by wildcard and regular expression as documented byPatternHelper.matchPattern(String, String)
. For example to only include routes which starts with foo in their route id's, use: include=foo* And to exclude routes which starts from JMS endpoints, use: exclude=jms:* Multiple patterns can be separated by comma, for example to exclude both foo and bar routes, use: exclude=foo*,bar* Exclude takes precedence over include. -
isBeanIntrospectionExtendedStatistics
public boolean isBeanIntrospectionExtendedStatistics() -
setBeanIntrospectionExtendedStatistics
public void setBeanIntrospectionExtendedStatistics(boolean beanIntrospectionExtendedStatistics) Sets whether bean introspection uses extended statistics. The default is false. -
getBeanIntrospectionLoggingLevel
public org.apache.camel.LoggingLevel getBeanIntrospectionLoggingLevel() -
setBeanIntrospectionLoggingLevel
public void setBeanIntrospectionLoggingLevel(org.apache.camel.LoggingLevel beanIntrospectionLoggingLevel) Sets the logging level used by bean introspection, logging activity of its usage. The default is TRACE. -
isRoutesCollectorEnabled
public boolean isRoutesCollectorEnabled() -
setRoutesCollectorEnabled
public void setRoutesCollectorEnabled(boolean routesCollectorEnabled) Whether the routes collector is enabled or not. When enabled Camel will auto-discover routes (RouteBuilder instances from the registry and also load additional routes from the file system). The routes collector is default enabled. -
isRoutesCollectorIgnoreLoadingError
public boolean isRoutesCollectorIgnoreLoadingError() -
setRoutesCollectorIgnoreLoadingError
public void setRoutesCollectorIgnoreLoadingError(boolean routesCollectorIgnoreLoadingError) Whether the routes collector should ignore any errors during loading and compiling routes. This is only intended for development or tooling. -
getCompileWorkDir
-
setCompileWorkDir
Work directory for compiler. Can be used to write compiled classes or other resources. -
getJavaRoutesIncludePattern
-
setJavaRoutesIncludePattern
Used for inclusive filtering RouteBuilder classes which are collected from the registry or via classpath scanning. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma. Multiple patterns can be specified separated by comma. For example to include all classes starting with Foo use: **/Foo* To include all routes form a specific package use: com/mycompany/foo/* To include all routes form a specific package and its sub-packages use double wildcards: com/mycompany/foo/** And to include all routes from two specific packages use: com/mycompany/foo/*,com/mycompany/stuff/* -
getJavaRoutesExcludePattern
-
setJavaRoutesExcludePattern
Used for exclusive filtering RouteBuilder classes which are collected from the registry or via classpath scanning. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma. For example to exclude all classes starting with Bar use: **/Bar* To exclude all routes form a specific package use: com/mycompany/bar/* To exclude all routes form a specific package and its sub-packages use double wildcards: com/mycompany/bar/** And to exclude all routes from two specific packages use: com/mycompany/bar/*,com/mycompany/stuff/* -
getRoutesIncludePattern
-
setRoutesIncludePattern
Used for inclusive filtering of routes from directories. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma, as example, to include all the routes from a directory whose name contains foo use: **/*foo*. -
getRoutesExcludePattern
-
setRoutesExcludePattern
Used for exclusive filtering of routes from directories. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma, as example, to exclude all the routes from a directory whose name contains foo use: **/*foo*. -
isRoutesReloadEnabled
public boolean isRoutesReloadEnabled() -
setRoutesReloadEnabled
public void setRoutesReloadEnabled(boolean routesReloadEnabled) Used for enabling automatic routes reloading. If enabled then Camel will watch for file changes in the given reload directory, and trigger reloading routes if files are changed. -
isContextReloadEnabled
public boolean isContextReloadEnabled() -
setContextReloadEnabled
public void setContextReloadEnabled(boolean contextReloadEnabled) Used for enabling context reloading. If enabled then Camel allow external systems such as security vaults (AWS secrets manager, etc.) to trigger refreshing Camel by updating property placeholders and reload all existing routes to take changes into effect. -
getRoutesReloadDirectory
-
setRoutesReloadDirectory
Directory to scan for route changes. Camel cannot scan the classpath, so this must be configured to a file directory. Development with Maven as build tool, you can configure the directory to be src/main/resources to scan for Camel routes in XML or YAML files. -
isRoutesReloadDirectoryRecursive
public boolean isRoutesReloadDirectoryRecursive() -
setRoutesReloadDirectoryRecursive
public void setRoutesReloadDirectoryRecursive(boolean routesReloadDirectoryRecursive) Whether the directory to scan should include sub directories. Depending on the number of sub directories, then this can cause the JVM to startup slower as Camel uses the JDK file-watch service to scan for file changes. -
getRoutesReloadPattern
-
setRoutesReloadPattern
Used for inclusive filtering of routes from directories. Typical used for specifying to accept routes in XML or YAML files, such as *.yaml,*.xml. Multiple patterns can be specified separated by comma. -
isRoutesReloadRemoveAllRoutes
public boolean isRoutesReloadRemoveAllRoutes() -
setRoutesReloadRemoveAllRoutes
public void setRoutesReloadRemoveAllRoutes(boolean routesReloadRemoveAllRoutes) When reloading routes should all existing routes be stopped and removed. By default, Camel will stop and remove all existing routes before reloading routes. This ensures that only the reloaded routes will be active. If disabled then only routes with the same route id is updated, and any existing routes are continued to run. -
isRoutesReloadRestartDuration
public boolean isRoutesReloadRestartDuration() -
setRoutesReloadRestartDuration
public void setRoutesReloadRestartDuration(boolean routesReloadRestartDuration) Whether to restart max duration when routes are reloaded. For example if max duration is 60 seconds, and a route is reloaded after 25 seconds, then this will restart the count and wait 60 seconds again. -
isJmxUpdateRouteEnabled
public boolean isJmxUpdateRouteEnabled() -
setJmxUpdateRouteEnabled
public void setJmxUpdateRouteEnabled(boolean jmxUpdateRouteEnabled) Whether to allow updating routes at runtime via JMX using the ManagedRouteMBean. This is disabled by default, but can be enabled for development and troubleshooting purposes, such as updating routes in an existing running Camel via JMX and other tools. -
isLightweight
public boolean isLightweight() -
setLightweight
public void setLightweight(boolean lightweight) Configure the context to be lightweight. This will trigger some optimizations and memory reduction options. Lightweight context have some limitations. At this moment, dynamic endpoint destinations are not supported. -
getExchangeFactory
-
setExchangeFactory
Controls whether to pool (reuse) exchanges or create new exchanges (prototype). Using pooled will reduce JVM garbage collection overhead by avoiding to re-create Exchange instances per message each consumer receives. The default is prototype mode. -
getExchangeFactoryCapacity
public int getExchangeFactoryCapacity()The capacity the pool (for each consumer) uses for storing exchanges. The default capacity is 100. -
setExchangeFactoryCapacity
public void setExchangeFactoryCapacity(int exchangeFactoryCapacity) The capacity the pool (for each consumer) uses for storing exchanges. The default capacity is 100. -
isExchangeFactoryStatisticsEnabled
public boolean isExchangeFactoryStatisticsEnabled() -
setExchangeFactoryStatisticsEnabled
public void setExchangeFactoryStatisticsEnabled(boolean exchangeFactoryStatisticsEnabled) Configures whether statistics is enabled on exchange factory. -
getDumpRoutes
-
setDumpRoutes
If dumping is enabled then Camel will during startup dump all loaded routes (incl rests and route templates) represented as XML/YAML DSL into the log. This is intended for trouble shooting or to assist during development. Sensitive information that may be configured in the route endpoints could potentially be included in the dump output and is therefore not recommended being used for production usage. This requires to have camel-xml-io/camel-yaml-io on the classpath to be able to dump the routes as XML/YAML. -
getDumpRoutesInclude
-
setDumpRoutesInclude
Controls what to include in output for route dumping. Possible values: all, routes, rests, routeConfigurations, routeTemplates, beans. Multiple values can be separated by comma. Default is routes. -
isDumpRoutesLog
public boolean isDumpRoutesLog() -
setDumpRoutesLog
public void setDumpRoutesLog(boolean dumpRoutesLog) Whether to log route dumps to Logger -
isDumpRoutesResolvePlaceholders
public boolean isDumpRoutesResolvePlaceholders() -
setDumpRoutesResolvePlaceholders
public void setDumpRoutesResolvePlaceholders(boolean dumpRoutesResolvePlaceholders) Whether to resolve property placeholders in the dumped output. Default is true. -
isDumpRoutesUriAsParameters
public boolean isDumpRoutesUriAsParameters() -
setDumpRoutesUriAsParameters
public void setDumpRoutesUriAsParameters(boolean dumpRoutesUriAsParameters) When dumping routes to YAML format, then this option controls whether endpoint URIs should be expanded into a key/value parameters. -
isDumpRoutesGeneratedIds
public boolean isDumpRoutesGeneratedIds() -
setDumpRoutesGeneratedIds
public void setDumpRoutesGeneratedIds(boolean dumpRoutesGeneratedIds) Whether to include auto generated IDs in the dumped output. Default is false. -
getDumpRoutesOutput
-
setDumpRoutesOutput
Whether to save route dumps to an output file. If the output is a filename, then all content is saved to this file. If the output is a directory name, then one or more files are saved to the directory, where the names are based on the original source file names, or auto generated names. -
getGlobalOptions
-
setGlobalOptions
Sets global options that can be referenced in the camel context Important: This has nothing to do with property placeholders, and is just a plain set of key/value pairs which are used to configure global options on CamelContext, such as a maximum debug logging length etc. -
addGlobalOption
Adds a global options that can be referenced in the camel context Important: This has nothing to do with property placeholders, and is just a plain set of key/value pairs which are used to configure global options on CamelContext, such as a maximum debug logging length etc. -
getStartupRecorder
-
setStartupRecorder
To use startup recorder for capturing execution time during starting Camel. The recorder can be one of: false (or off), logging, backlog, java-flight-recorder (or jfr). -
getStartupRecorderMaxDepth
public int getStartupRecorderMaxDepth() -
setStartupRecorderMaxDepth
public void setStartupRecorderMaxDepth(int startupRecorderMaxDepth) To filter our sub steps at a maximum depth. Use -1 for no maximum. Use 0 for no sub steps. Use 1 for max 1 sub step, and so forth. The default is -1. -
isStartupRecorderRecording
public boolean isStartupRecorderRecording() -
setStartupRecorderRecording
public void setStartupRecorderRecording(boolean startupRecorderRecording) To enable Java Flight Recorder to start a recording and automatic dump the recording to disk after startup is complete. This requires that camel-jfr is on the classpath, and to enable this option. -
getStartupRecorderProfile
-
setStartupRecorderProfile
To use a specific Java Flight Recorder profile configuration, such as default or profile. The default is default. -
getStartupRecorderDuration
public long getStartupRecorderDuration() -
setStartupRecorderDuration
public void setStartupRecorderDuration(long startupRecorderDuration) How long time to run the startup recorder. Use 0 (default) to keep the recorder running until the JVM is exited. Use -1 to stop the recorder right after Camel has been started (to only focus on potential Camel startup performance bottlenecks) Use a positive value to keep recording for N seconds. When the recorder is stopped then the recording is auto saved to disk (note: save to disk can be disabled by setting startupRecorderDir to false) -
getStartupRecorderDir
-
setStartupRecorderDir
Directory to store the recording. By default the current directory will be used. Use false to turn off saving recording to disk. -
withName
Sets the name of the CamelContext. -
withDescription
Sets the description (intended for humans) of the Camel application. -
withDurationMaxSeconds
To specify for how long time in seconds to keep running the JVM before automatic terminating the JVM. You can use this to run Camel for a short while. -
withDurationMaxIdleSeconds
To specify for how long time in seconds Camel can be idle before automatic terminating the JVM. You can use this to run Camel for a short while. -
withDurationMaxMessages
To specify how many messages to process by Camel before automatic terminating the JVM. You can use this to run Camel for a short while. -
withDurationMaxAction
Controls whether the Camel application should shutdown the JVM, or stop all routes, when duration max is triggered. -
withShutdownTimeout
Timeout in seconds to graceful shutdown all the Camel routes. -
withShutdownSuppressLoggingOnTimeout
Whether Camel should try to suppress logging during shutdown and timeout was triggered, meaning forced shutdown is happening. And during forced shutdown we want to avoid logging errors/warnings et all in the logs as a side-effect of the forced timeout. Notice the suppress is a best effort as there may still be some logs coming from 3rd party libraries and whatnot, which Camel cannot control. This option is default false. -
withShutdownNowOnTimeout
Sets whether to force shutdown of all consumers when a timeout occurred and thus not all consumers was shutdown within that period. You should have good reasons to set this option to false as it means that the routes keep running and is halted abruptly when CamelContext has been shutdown. -
withShutdownRoutesInReverseOrder
Sets whether routes should be shutdown in reverse or the same order as they where started. -
withShutdownLogInflightExchangesOnTimeout
Sets whether to log information about the inflight Exchanges which are still running during a shutdown which didn't complete without the given timeout. This requires to enable the option inflightRepositoryExchangeEnabled. -
withInflightRepositoryBrowseEnabled
Sets whether the inflight repository should allow browsing each inflight exchange. This is by default disabled as there is a very slight performance overhead when enabled. -
withFileConfigurations
Directory to load additional configuration files that contains configuration values that takes precedence over any other configuration. This can be used to refer to files that may have secret configuration that has been mounted on the file system for containers. You can specify a pattern to load from sub directories and a name pattern such as /var/app/secret/*.properties, multiple directories can be separated by comma. -
withJmxEnabled
Enable JMX in your Camel application. -
withProducerTemplateCacheSize
Producer template endpoints cache size. -
withConsumerTemplateCacheSize
Consumer template endpoints cache size. -
withLoadTypeConverters
Whether to load custom type converters by scanning classpath. This is used for backwards compatibility with Camel 2.x. Its recommended to migrate to use fast type converter loading by setting @Converter(loader = true) on your custom type converter classes. -
withLoadHealthChecks
Whether to load custom health checks by scanning classpath. -
withModeline
Whether camel-k style modeline is also enabled when not using camel-k. Enabling this allows to use a camel-k like experience by being able to configure various settings using modeline directly in your route source code. -
withDevConsoleEnabled
Whether to enable developer console (requires camel-console on classpath). The developer console is only for assisting during development. This is NOT for production usage. -
withLogDebugMaxChars
Is used to limit the maximum length of the logging Camel message bodies. If the message body is longer than the limit, the log message is clipped. Use -1 to have unlimited length. Use for example 1000 to log at most 1000 characters. -
withStreamCachingEnabled
Sets whether stream caching is enabled or not. While stream types (like StreamSource, InputStream and Reader) are commonly used in messaging for performance reasons, they also have an important drawback: they can only be read once. In order to be able to work with message content multiple times, the stream needs to be cached. Streams are cached in memory only (by default). If streamCachingSpoolEnabled=true, then, for large stream messages (over 128 KB by default) will be cached in a temporary file instead, and Camel will handle deleting the temporary file once the cached stream is no longer necessary. Default is true. -
withStreamCachingAllowClasses
To filter stream caching of a given set of allowed/denied classes. By default, all classes that areInputStream
is allowed. Multiple class names can be separated by comma. -
withStreamCachingDenyClasses
To filter stream caching of a given set of allowed/denied classes. By default, all classes that areInputStream
is allowed. Multiple class names can be separated by comma. -
withStreamCachingSpoolEnabled
To enable stream caching spooling to disk. This means, for large stream messages (over 128 KB by default) will be cached in a temporary file instead, and Camel will handle deleting the temporary file once the cached stream is no longer necessary. Default is false. -
withStreamCachingSpoolDirectory
Sets the stream caching spool (temporary) directory to use for overflow and spooling to disk. If no spool directory has been explicit configured, then a temporary directory is created in the java.io.tmpdir directory. -
withStreamCachingSpoolCipher
Sets a stream caching cipher name to use when spooling to disk to write with encryption. By default the data is not encrypted. -
withStreamCachingSpoolThreshold
Stream caching threshold in bytes when overflow to disk is activated. The default threshold is 128kb. Use -1 to disable overflow to disk. -
withStreamCachingSpoolUsedHeapMemoryThreshold
public T withStreamCachingSpoolUsedHeapMemoryThreshold(int streamCachingSpoolUsedHeapMemoryThreshold) Sets a percentage (1-99) of used heap memory threshold to activate stream caching spooling to disk. -
withStreamCachingSpoolUsedHeapMemoryLimit
Sets what the upper bounds should be when streamCachingSpoolUsedHeapMemoryThreshold is in use. -
withStreamCachingAnySpoolRules
Sets whether if just any of the org.apache.camel.spi.StreamCachingStrategy.SpoolRule rules returns true then shouldSpoolCache(long) returns true, to allow spooling to disk. If this option is false, then all the org.apache.camel.spi.StreamCachingStrategy.SpoolRule must return true. The default value is false which means that all the rules must return true. -
withStreamCachingBufferSize
Sets the stream caching buffer size to use when allocating in-memory buffers used for in-memory stream caches. The default size is 4096. -
withStreamCachingRemoveSpoolDirectoryWhenStopping
public T withStreamCachingRemoveSpoolDirectoryWhenStopping(boolean streamCachingRemoveSpoolDirectoryWhenStopping) Whether to remove stream caching temporary directory when stopping. This option is default true. -
withStreamCachingStatisticsEnabled
Sets whether stream caching statistics is enabled. -
withTypeConverterStatisticsEnabled
Sets whether type converter statistics is enabled. By default the type converter utilization statistics is disabled. Notice: If enabled then there is a slight performance impact under very heavy load. -
withTracing
Sets whether tracing is enabled or not. Default is false. -
withTracingStandby
Whether to set tracing on standby. If on standby then the tracer is installed and made available. Then the tracer can be enabled later at runtime via JMX or viaTracer.setEnabled(boolean)
. Default is false. -
withTracingTemplates
Whether tracing should trace inner details from route templates (or kamelets). Turning this on increases the verbosity of tracing by including events from internal routes in the templates or kamelets. Default is false. -
withMessageHistory
Sets whether message history is enabled or not. Default is false. -
withSourceLocationEnabled
Whether to capture precise source location:line-number for all EIPs in Camel routes. Enabling this will impact parsing Java based routes (also Groovy, Kotlin, etc.) on startup as this uses JDK StackTraceElement to calculate the location from the Camel route, which comes with a performance cost. This only impact startup, not the performance of the routes at runtime. -
withLogMask
Sets whether log mask is enabled or not. Default is false. -
withLogExhaustedMessageBody
Sets whether to log exhausted message body with message history. Default is false. -
withAutoStartup
Sets whether the object should automatically start when Camel starts. Important: Currently only routes can be disabled, as CamelContext's are always started. Note: When setting auto startup false on CamelContext then that takes precedence and no routes is started. You would need to start CamelContext explicit using the org.apache.camel.CamelContext.start() method, to start the context, and then you would need to start the routes manually using CamelContext.getRouteController().startRoute(String). Default is true to always start up. -
withAllowUseOriginalMessage
Sets whether to allow access to the original message from Camel's error handler, or from org.apache.camel.spi.UnitOfWork.getOriginalInMessage(). Turning this off can optimize performance, as defensive copy of the original message is not needed. Default is false. -
withCaseInsensitiveHeaders
Whether to use case sensitive or insensitive headers. Important: When using case sensitive (this is set to false). Then the map is case sensitive which means headers such as content-type and Content-Type are two different keys which can be a problem for some protocols such as HTTP based, which rely on case insensitive headers. However case sensitive implementations can yield faster performance. Therefore use case sensitive implementation with care. Default is true. -
withEndpointRuntimeStatisticsEnabled
Sets whether endpoint runtime statistics is enabled (gathers runtime usage of each incoming and outgoing endpoints). The default value is false. -
withLoadStatisticsEnabled
Sets whether context load statistics is enabled (something like the unix load average). The default value is false. -
withEndpointLazyStartProducer
Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. The default value is false. -
withEndpointBridgeErrorHandler
Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN/ERROR level and ignored. The default value is false. -
withUseDataType
Whether to enable using data type on Camel messages. Data type are automatic turned on if one ore more routes has been explicit configured with input and output types. Otherwise data type is default off. -
withUseBreadcrumb
Set whether breadcrumb is enabled. The default value is false. -
withBeanPostProcessorEnabled
Can be used to turn off bean post processing. Be careful to turn this off, as this means that beans that use Camel annotations such asEndpointInject
,ProducerTemplate
,Produce
,Consume
etc will not be injected and in use. Turning this off should only be done if you are sure you do not use any of these Camel features. Not all runtimes allow turning this off (such as camel-blueprint or camel-cdi with XML). The default value is true (enabled). -
withJmxManagementMBeansLevel
public T withJmxManagementMBeansLevel(org.apache.camel.ManagementMBeansLevel jmxManagementMBeansLevel) Sets the mbeans registration level. The default value is Default. -
withJmxManagementStatisticsLevel
public T withJmxManagementStatisticsLevel(org.apache.camel.ManagementStatisticsLevel jmxManagementStatisticsLevel) Sets the JMX statistics level The level can be set to Extended to gather additional information The default value is Default. -
withJmxManagementNamePattern
The naming pattern for creating the CamelContext JMX management name. The default pattern is #name# -
withJmxManagementRegisterRoutesCreateByKamelet
public T withJmxManagementRegisterRoutesCreateByKamelet(boolean jmxManagementRegisterRoutesCreateByKamelet) Whether routes created by Kamelets should be registered for JMX management. Enabling this allows to have fine-grained monitoring and management of every route created via Kamelets. This is default disabled as a Kamelet is intended as a component (black-box) and its implementation details as Camel route makes the overall management and monitoring of Camel applications more verbose. During development of Kamelets then enabling this will make it possible for developers to do fine-grained performance inspection and identify potential bottlenecks in the Kamelet routes. However, for production usage then keeping this disabled is recommended. -
withJmxManagementRegisterRoutesCreateByTemplate
public T withJmxManagementRegisterRoutesCreateByTemplate(boolean jmxManagementRegisterRoutesCreateByTemplate) Whether routes created by route templates (not Kamelets) should be registered for JMX management. Enabling this allows to have fine-grained monitoring and management of every route created via route templates. This is default enabled (unlike Kamelets) as routes created via templates is regarded as standard routes, and should be available for management and monitoring. -
withCamelEventsTimestampEnabled
Whether to include timestamps for all emitted Camel Events. Enabling this allows to know fine-grained at what time each event was emitted, which can be used for reporting to report exactly the time of the events. This is by default false to avoid the overhead of including this information. -
withUseMdcLogging
To turn on MDC logging -
withThreadNamePattern
Sets the thread name pattern used for creating the full thread name. The default pattern is: Camel (#camelId#) thread ##counter# - #name# Where #camelId# is the name of the CamelContext. and #counter# is a unique incrementing counter. and #name# is the regular thread name. You can also use #longName# which is the long thread name which can includes endpoint parameters etc. -
withRouteFilterIncludePattern
Used for filtering routes routes matching the given pattern, which follows the following rules: - Match by route id - Match by route input endpoint uri The matching is using exact match, by wildcard and regular expression as documented byPatternHelper.matchPattern(String, String)
. For example to only include routes which starts with foo in their route id's, use: include=foo* And to exclude routes which starts from JMS endpoints, use: exclude=jms:* Multiple patterns can be separated by comma, for example to exclude both foo and bar routes, use: exclude=foo*,bar* Exclude takes precedence over include. -
withRouteFilterExcludePattern
Used for filtering routes routes matching the given pattern, which follows the following rules: - Match by route id - Match by route input endpoint uri The matching is using exact match, by wildcard and regular expression as documented byPatternHelper.matchPattern(String, String)
. For example to only include routes which starts with foo in their route id's, use: include=foo* And to exclude routes which starts from JMS endpoints, use: exclude=jms:* Multiple patterns can be separated by comma, for example to exclude both foo and bar routes, use: exclude=foo*,bar* Exclude takes precedence over include. -
withBeanIntrospectionExtendedStatistics
Sets whether bean introspection uses extended statistics. The default is false. -
withBeanIntrospectionLoggingLevel
public T withBeanIntrospectionLoggingLevel(org.apache.camel.LoggingLevel beanIntrospectionLoggingLevel) Sets the logging level used by bean introspection, logging activity of its usage. The default is TRACE. -
withTracingPattern
Tracing pattern to match which node EIPs to trace. For example to match all To EIP nodes, use to*. The pattern matches by node and route id's Multiple patterns can be separated by comma. -
withTracingLoggingFormat
To use a custom tracing logging format. The default format (arrow, routeId, label) is: %-4.4s [%-12.12s] [%-33.33s] -
withMdcLoggingKeysPattern
Sets the pattern used for determine which custom MDC keys to propagate during message routing when the routing engine continues routing asynchronously for the given message. Setting this pattern to * will propagate all custom keys. Or setting the pattern to foo*,bar* will propagate any keys starting with either foo or bar. Notice that a set of standard Camel MDC keys are always propagated which starts with camel. as key name. The match rules are applied in this order (case insensitive): 1. exact match, returns true 2. wildcard match (pattern ends with a * and the name starts with the pattern), returns true 3. regular expression match, returns true 4. otherwise returns false -
withRoutesCollectorEnabled
Whether the routes collector is enabled or not. When enabled Camel will auto-discover routes (RouteBuilder instances from the registry and also load additional XML routes from the file system. The routes collector is default enabled. -
withRoutesCollectorIgnoreLoadingError
Whether the routes collector should ignore any errors during loading and compiling routes. This is only intended for development or tooling. -
withCompileWorkDir
Work directory for compiler. Can be used to write compiled classes or other resources. -
withJavaRoutesIncludePattern
Used for inclusive filtering component scanning of RouteBuilder classes with @Component annotation. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma. For example to include all classes starting with Foo use: **/Foo* To include all routes form a specific package use: com/mycompany/foo/* To include all routes form a specific package and its sub-packages use double wildcards: com/mycompany/foo/** And to include all routes from two specific packages use: com/mycompany/foo/*,com/mycompany/stuff/* -
withJavaRoutesExcludePattern
Used for exclusive filtering component scanning of RouteBuilder classes with @Component annotation. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma. For example to exclude all classes starting with Bar use: **/Bar* To exclude all routes form a specific package use: com/mycompany/bar/* To exclude all routes form a specific package and its sub-packages use double wildcards: com/mycompany/bar/** And to exclude all routes from two specific packages use: com/mycompany/bar/*,com/mycompany/stuff/* -
withRoutesIncludePattern
Used for inclusive filtering of routes from directories. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma, as example, to include all the routes from a directory whose name contains foo use: **/*foo*. -
withRoutesExcludePattern
Used for exclusive filtering of routes from directories. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma, as example, to exclude all the routes from a directory whose name contains foo use: **/*foo*. -
withContextReloadEnabled
Used for enabling context reloading. If enabled then Camel allow external systems such as security vaults (AWS secrets manager, etc.) to trigger refreshing Camel by updating property placeholders and reload all existing routes to take changes into effect. -
withRoutesReloadEnabled
Used for enabling automatic routes reloading. If enabled then Camel will watch for file changes in the given reload directory, and trigger reloading routes if files are changed. -
withRoutesReloadDirectory
Directory to scan (incl subdirectories) for route changes. Camel cannot scan the classpath, so this must be configured to a file directory. Development with Maven as build tool, you can configure the directory to be src/main/resources to scan for Camel routes in XML or YAML files. -
withRoutesReloadDirectoryRecursive
Whether the directory to scan should include sub directories. Depending on the number of sub directories, then this can cause the JVM to startup slower as Camel uses the JDK file-watch service to scan for file changes. -
withRoutesReloadPattern
Used for inclusive filtering of routes from directories. Typical used for specifying to accept routes in XML or YAML files. The default pattern is *.yaml,*.xml Multiple patterns can be specified separated by comma. -
withRoutesReloadRemoveAllRoutes
When reloading routes should all existing routes be stopped and removed. By default, Camel will stop and remove all existing routes before reloading routes. This ensures that only the reloaded routes will be active. If disabled then only routes with the same route id is updated, and any existing routes are continued to run. -
withRoutesReloadRestartDuration
Whether to restart max duration when routes are reloaded. For example if max duration is 60 seconds, and a route is reloaded after 25 seconds, then this will restart the count and wait 60 seconds again. -
withLightweight
Configure the context to be lightweight. This will trigger some optimizations and memory reduction options. Lightweight context have some limitations. At the moment, dynamic endpoint destinations are not supported. Also, this should only be done on a JVM with a single Camel application (microservice like camel-main, camel-quarkus, camel-spring-boot). As this affects the entire JVM where Camel JARs are on the classpath. -
withExchangeFactory
Controls whether to pool (reuse) exchanges or create new fresh exchanges (default). Using pooled will reduce JVM garbage collection overhead by avoiding to re-create Exchange instances per message each consumer receives. -
withExchangeFactoryCapacity
The capacity the pool (for each consumer) uses for storing exchanges. The default capacity is 100. -
withExchangeFactoryStatisticsEnabled
Configures whether statistics is enabled on exchange factory. -
withDumpRoutes
If dumping is enabled then Camel will during startup dump all loaded routes (incl rests and route templates) represented as XML/YAML DSL into the log. This is intended for trouble shooting or to assist during development. Sensitive information that may be configured in the route endpoints could potentially be included in the dump output and is therefore not recommended being used for production usage. This requires to have camel-xml-io/camel-yaml-io on the classpath to be able to dump the routes as XML/YAML. -
withDumpRoutesInclude
Controls what to include in output for route dumping. Possible values: all, routes, rests, routeConfigurations, routeTemplates, beans. Multiple values can be separated by comma. Default is routes. -
withDumpRoutesLog
Whether to log route dumps to Logger -
withDumpRoutesResolvePlaceholders
Whether to resolve property placeholders in the dumped output. Default is true. -
withDumpRoutesUriAsParameters
When dumping routes to YAML format, then this option controls whether endpoint URIs should be expanded into a key/value parameters. -
withDumpRoutesGeneratedIds
Whether to include auto generated IDs in the dumped output. Default is false. -
withDumpRoutesOutput
Whether to save route dumps to an output file. If the output is a filename, then all content is saved to this file. If the output is a directory name, then one or more files are saved to the directory, where the names are based on the original source file names, or auto generated names. -
withGlobalOptions
Sets global options that can be referenced in the camel context Important: This has nothing to do with property placeholders, and is just a plain set of key/value pairs which are used to configure global options on CamelContext, such as a maximum debug logging length etc. -
withGlobalOption
Sets global options that can be referenced in the camel context Important: This has nothing to do with property placeholders, and is just a plain set of key/value pairs which are used to configure global options on CamelContext, such as a maximum debug logging length etc. -
withStartupRecorder
To use startup recorder for capturing execution time during starting Camel. The recorder can be one of: false (or off), logging, backlog, java-flight-recorder (or jfr). The default is false. -
withStartupRecorderMaxDepth
To filter our sub steps at a maximum depth. Use -1 for no maximum. Use 0 for no sub steps. Use 1 for max 1 sub step, and so forth. The default is -1. -
withStartupRecorderRecording
To enable Java Flight Recorder to start a recording and automatic dump the recording to disk after startup is complete. This requires that camel-jfr is on the classpath, and to enable this option. -
withStartupRecorderProfile
To use a specific Java Flight Recorder profile configuration, such as default or profile. The default is default. -
withStartupRecorderDuration
How long time to run the startup recorder. Use 0 (default) to keep the recorder running until the JVM is exited. Use -1 to stop the recorder right after Camel has been started (to only focus on potential Camel startup performance bottlenecks) Use a positive value to keep recording for N seconds. When the recorder is stopped then the recording is auto saved to disk (note: save to disk can be disabled by setting startupRecorderDir to false) -
withStartupRecorderDir
Directory to store the recording. By default the current directory will be used.
-