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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGlobalOption(String key, Object value) Adds a global options that can be referenced in the camel contextorg.apache.camel.LoggingLevelintintintintintThe capacity the pool (for each consumer) uses for storing exchanges.org.apache.camel.ManagementMBeansLevelorg.apache.camel.ManagementStatisticsLevelintgetName()intlonglonglonglongdoublelongintintlongintorg.apache.camel.StartupSummaryLevelintlongintbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidsetAllowUseOriginalMessage(boolean allowUseOriginalMessage) Sets whether to allow access to the original message from Camel's error handler, or from org.apache.camel.spi.UnitOfWork.getOriginalInMessage().voidsetAutoStartup(boolean autoStartup) Sets whether the object should automatically start when Camel starts.voidsetAutowiredEnabled(boolean autowiredEnabled) Whether autowiring is enabled.voidsetBacklogTracing(boolean backlogTracing) Sets whether backlog tracing is enabled or not.voidsetBacklogTracingStandby(boolean backlogTracingStandby) Whether to set backlog tracing on standby.voidsetBacklogTracingTemplates(boolean backlogTracingTemplates) Whether backlog tracing should trace inner details from route templates (or kamelets).voidsetBeanIntrospectionExtendedStatistics(boolean beanIntrospectionExtendedStatistics) Sets whether bean introspection uses extended statistics.voidsetBeanIntrospectionLoggingLevel(org.apache.camel.LoggingLevel beanIntrospectionLoggingLevel) Sets the logging level used by bean introspection, logging activity of its usage.voidsetBeanPostProcessorEnabled(boolean beanPostProcessorEnabled) Can be used to turn off bean post processing.voidsetCamelEventsTimestampEnabled(boolean camelEventsTimestampEnabled) Whether to include timestamps for all emitted Camel Events.voidsetCaseInsensitiveHeaders(boolean caseInsensitiveHeaders) Whether to use case sensitive or insensitive headers.voidsetConsumerTemplateCacheSize(int consumerTemplateCacheSize) Consumer template endpoints cache size.voidsetContextReloadEnabled(boolean contextReloadEnabled) Used for enabling context reloading.voidsetDebugging(boolean debugging) Sets whether debugging is enabled or not.voidsetDescription(String description) Sets the description (intended for humans) of the Camel application.voidsetDevConsoleEnabled(boolean devConsoleEnabled) Whether to enable developer console (requires camel-console on classpath).voidsetDumpRoutes(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.voidsetDurationMaxAction(String durationMaxAction) Controls whether the Camel application should shutdown the JVM, or stop all routes, when duration max is triggered.voidsetDurationMaxIdleSeconds(int durationMaxIdleSeconds) To specify for how long time in seconds Camel can be idle before automatic terminating the JVM.voidsetDurationMaxMessages(int durationMaxMessages) To specify how many messages to process by Camel before automatic terminating the JVM.voidsetDurationMaxSeconds(int durationMaxSeconds) To specify for how long time in seconds to keep running the JVM before automatic terminating the JVM.voidsetEndpointBridgeErrorHandler(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.voidsetEndpointLazyStartProducer(boolean endpointLazyStartProducer) Whether the producer should be started lazy (on the first message).voidsetEndpointRuntimeStatisticsEnabled(boolean endpointRuntimeStatisticsEnabled) Sets whether endpoint runtime statistics is enabled (gathers runtime usage of each incoming and outgoing endpoints).voidsetExchangeFactory(String exchangeFactory) Controls whether to pool (reuse) exchanges or create new exchanges (prototype).voidsetExchangeFactoryCapacity(int exchangeFactoryCapacity) The capacity the pool (for each consumer) uses for storing exchanges.voidsetExchangeFactoryStatisticsEnabled(boolean exchangeFactoryStatisticsEnabled) Configures whether statistics is enabled on exchange factory.voidsetFileConfigurations(String fileConfigurations) Directory to load additional configuration files that contains configuration values that takes precedence over any other configuration.voidsetGlobalOptions(Map<String, String> globalOptions) Sets global options that can be referenced in the camel contextvoidsetInflightRepositoryBrowseEnabled(boolean inflightRepositoryBrowseEnabled) Sets whether the inflight repository should allow browsing each inflight exchange.voidsetJavaRoutesExcludePattern(String javaRoutesExcludePattern) Used for exclusive filtering RouteBuilder classes which are collected from the registry or via classpath scanning.voidsetJavaRoutesIncludePattern(String javaRoutesIncludePattern) Used for inclusive filtering RouteBuilder classes which are collected from the registry or via classpath scanning.voidsetJmxEnabled(boolean jmxEnabled) Enable JMX in your Camel application.voidsetJmxManagementMBeansLevel(org.apache.camel.ManagementMBeansLevel jmxManagementMBeansLevel) Sets the mbeans registration level.voidsetJmxManagementNamePattern(String jmxManagementNamePattern) The naming pattern for creating the CamelContext JMX management name.voidsetJmxManagementStatisticsLevel(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.voidsetLightweight(boolean lightweight) Configure the context to be lightweight.voidsetLoadHealthChecks(boolean loadHealthChecks) Whether to load custom health checks by scanning classpath.voidsetLoadStatisticsEnabled(boolean loadStatisticsEnabled) Sets whether context load statistics is enabled (something like the unix load average).voidsetLoadTypeConverters(boolean loadTypeConverters) Whether to load custom type converters by scanning classpath.voidsetLogDebugMaxChars(int logDebugMaxChars) Is used to limit the maximum length of the logging Camel message bodies.voidsetLogExhaustedMessageBody(boolean logExhaustedMessageBody) Sets whether to log exhausted message body with message history.voidsetLogMask(boolean logMask) Sets whether log mask is enabled or not.voidsetMdcLoggingKeysPattern(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.voidsetMessageHistory(boolean messageHistory) Sets whether message history is enabled or not.voidsetModeline(boolean modeline) Whether camel-k style modeline is also enabled when not using camel-k.voidSets the name of the CamelContext.voidsetProducerTemplateCacheSize(int producerTemplateCacheSize) Producer template endpoints cache size.voidsetRouteControllerBackOffDelay(long routeControllerBackOffDelay) Backoff delay in millis when restarting a route that failed to startup.voidsetRouteControllerBackOffMaxAttempts(long routeControllerBackOffMaxAttempts) Backoff maximum number of attempts to restart a route that failed to startup.voidsetRouteControllerBackOffMaxDelay(long routeControllerBackOffMaxDelay) Backoff maximum delay in millis when restarting a route that failed to startup.voidsetRouteControllerBackOffMaxElapsedTime(long routeControllerBackOffMaxElapsedTime) Backoff maximum elapsed time in millis, after which the backoff should be considered exhausted and no more attempts should be made.voidsetRouteControllerBackOffMultiplier(double routeControllerBackOffMultiplier) Backoff multiplier to use for exponential backoff.voidsetRouteControllerExcludeRoutes(String routeControllerExcludeRoutes) Pattern for filtering routes to be excluded as supervised.voidsetRouteControllerIncludeRoutes(String routeControllerIncludeRoutes) Pattern for filtering routes to be included as supervised.voidsetRouteControllerInitialDelay(long routeControllerInitialDelay) Initial delay in milli seconds before the route controller starts, after CamelContext has been started.voidsetRouteControllerSuperviseEnabled(boolean routeControllerSuperviseEnabled) To enable using supervising route controller which allows Camel to startup and then the controller takes care of starting the routes in a safe manner.voidsetRouteControllerThreadPoolSize(int routeControllerThreadPoolSize) The number of threads used by the route controller scheduled thread pool that are used for restarting routes.voidsetRouteControllerUnhealthyOnExhausted(boolean routeControllerUnhealthyOnExhausted) Whether to mark the route as unhealthy (down) when all restarting attempts (backoff) have failed and the route is not successfully started and the route manager is giving up.voidsetRouteFilterExcludePattern(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).voidsetRouteFilterIncludePattern(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).voidsetRoutesCollectorEnabled(boolean routesCollectorEnabled) Whether the routes collector is enabled or not.voidsetRoutesExcludePattern(String routesExcludePattern) Used for exclusive filtering of routes from directories.voidsetRoutesIncludePattern(String routesIncludePattern) Used for inclusive filtering of routes from directories.voidsetRoutesReloadDirectory(String routesReloadDirectory) Directory to scan for route changes.voidsetRoutesReloadDirectoryRecursive(boolean routesReloadDirectoryRecursive) Whether the directory to scan should include sub directories.voidsetRoutesReloadEnabled(boolean routesReloadEnabled) Used for enabling automatic routes reloading.voidsetRoutesReloadPattern(String routesReloadPattern) Used for inclusive filtering of routes from directories.voidsetRoutesReloadRemoveAllRoutes(boolean routesReloadRemoveAllRoutes) When reloading routes should all existing routes be stopped and removed.voidsetRoutesReloadRestartDuration(boolean routesReloadRestartDuration) Whether to restart max duration when routes are reloaded.voidsetShutdownLogInflightExchangesOnTimeout(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.voidsetShutdownNowOnTimeout(boolean shutdownNowOnTimeout) Sets whether to force shutdown of all consumers when a timeout occurred and thus not all consumers was shutdown within that period.voidsetShutdownRoutesInReverseOrder(boolean shutdownRoutesInReverseOrder) Sets whether routes should be shutdown in reverse or the same order as they were started.voidsetShutdownSuppressLoggingOnTimeout(boolean shutdownSuppressLoggingOnTimeout) Whether Camel should try to suppress logging during shutdown and timeout was triggered, meaning forced shutdown is happening.voidsetShutdownTimeout(int shutdownTimeout) Timeout in seconds to graceful shutdown all the Camel routes.voidsetSourceLocationEnabled(boolean sourceLocationEnabled) Whether to capture precise source location:line-number for all EIPs in Camel routes.voidsetStartupRecorder(String startupRecorder) To use startup recorder for capturing execution time during starting Camel.voidsetStartupRecorderDir(String startupRecorderDir) Directory to store the recording.voidsetStartupRecorderDuration(long startupRecorderDuration) How long time to run the startup recorder.voidsetStartupRecorderMaxDepth(int startupRecorderMaxDepth) To filter our sub steps at a maximum depth.voidsetStartupRecorderProfile(String startupRecorderProfile) To use a specific Java Flight Recorder profile configuration, such as default or profile.voidsetStartupRecorderRecording(boolean startupRecorderRecording) To enable Java Flight Recorder to start a recording and automatic dump the recording to disk after startup is complete.voidsetStartupSummaryLevel(org.apache.camel.StartupSummaryLevel startupSummaryLevel) Controls the level of information logged during startup (and shutdown) of CamelContext.voidsetStreamCachingAllowClasses(String streamCachingAllowClasses) To filter stream caching of a given set of allowed/denied classes.voidsetStreamCachingAnySpoolRules(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.voidsetStreamCachingBufferSize(int streamCachingBufferSize) Sets the stream caching buffer size to use when allocating in-memory buffers used for in-memory stream caches.voidsetStreamCachingDenyClasses(String streamCachingDenyClasses) To filter stream caching of a given set of allowed/denied classes.voidsetStreamCachingEnabled(boolean streamCachingEnabled) Sets whether stream caching is enabled or not.voidsetStreamCachingRemoveSpoolDirectoryWhenStopping(boolean streamCachingRemoveSpoolDirectoryWhenStopping) Whether to remove stream caching temporary directory when stopping.voidsetStreamCachingSpoolCipher(String streamCachingSpoolCipher) Sets a stream caching cipher name to use when spooling to disk to write with encryption.voidsetStreamCachingSpoolDirectory(String streamCachingSpoolDirectory) Sets the stream caching spool (temporary) directory to use for overflow and spooling to disk.voidsetStreamCachingSpoolEnabled(boolean streamCachingSpoolEnabled) To enable stream caching spooling to disk.voidsetStreamCachingSpoolThreshold(long streamCachingSpoolThreshold) Stream caching threshold in bytes when overflow to disk is activated.voidsetStreamCachingSpoolUsedHeapMemoryLimit(String streamCachingSpoolUsedHeapMemoryLimit) Sets what the upper bounds should be when streamCachingSpoolUsedHeapMemoryThreshold is in use.voidsetStreamCachingSpoolUsedHeapMemoryThreshold(int streamCachingSpoolUsedHeapMemoryThreshold) Sets a percentage (1-99) of used heap memory threshold to activate stream caching spooling to disk.voidsetStreamCachingStatisticsEnabled(boolean streamCachingStatisticsEnabled) Sets whether stream caching statistics is enabled.voidsetThreadNamePattern(String threadNamePattern) Sets the thread name pattern used for creating the full thread name.voidsetTracing(boolean tracing) Sets whether tracing is enabled or not.voidsetTracingLoggingFormat(String format) To use a custom tracing logging format.voidsetTracingPattern(String tracingPattern) Tracing pattern to match which node EIPs to trace.voidsetTracingStandby(boolean tracingStandby) Whether to set tracing on standby.voidsetTracingTemplates(boolean tracingTemplates) Whether tracing should trace inner details from route templates (or kamelets).voidsetTypeConverterStatisticsEnabled(boolean typeConverterStatisticsEnabled) Sets whether type converter statistics is enabled.voidsetUseBreadcrumb(boolean useBreadcrumb) Set whether breadcrumb is enabled.voidsetUseDataType(boolean useDataType) Whether to enable using data type on Camel messages.voidsetUseMdcLogging(boolean useMdcLogging) To turn on MDC loggingvoidsetUuidGenerator(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.withBacklogTracing(boolean backlogTracing) Sets whether backlog tracing is enabled or not.withBacklogTracingStandby(boolean backlogTracingStandby) Whether to set backlog tracing on standby.withBacklogTracingTemplates(boolean backlogTracingTemplates) Whether backlog tracing should trace inner details from route templates (or kamelets).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.withConsumerTemplateCacheSize(int consumerTemplateCacheSize) Consumer template endpoints cache size.withContextReloadEnabled(boolean contextReloadEnabled) Used for enabling context reloading.withDebugging(boolean debugging) Sets whether debugging is enabled or not.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.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.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.withRouteControllerBackOffDelay(long routeControllerBackOffDelay) Backoff delay in millis when restarting a route that failed to startup.withRouteControllerBackOffMaxAttempts(long routeControllerBackOffMaxAttempts) Backoff maximum number of attempts to restart a route that failed to startup.withRouteControllerBackOffMaxDelay(long routeControllerBackOffMaxDelay) Backoff maximum delay in millis when restarting a route that failed to startup.withRouteControllerBackOffMaxElapsedTime(long routeControllerBackOffMaxElapsedTime) Backoff maximum elapsed time in millis, after which the backoff should be considered exhausted and no more attempts should be made.withRouteControllerBackOffMultiplier(double routeControllerBackOffMultiplier) Backoff multiplier to use for exponential backoff.withRouteControllerExcludeRoutes(String routeControllerExcludeRoutes) Pattern for filtering routes to be excluded as supervised.withRouteControllerIncludeRoutes(String routeControllerIncludeRoutes) Pattern for filtering routes to be included as supervised.withRouteControllerInitialDelay(long routeControllerInitialDelay) Initial delay in milli seconds before the route controller starts, after CamelContext has been started.withRouteControllerSuperviseEnabled(boolean routeControllerSuperviseEnabled) To enable using supervising route controller which allows Camel to startup and then the controller takes care of starting the routes in a safe manner.withRouteControllerThreadPoolSize(int routeControllerThreadPoolSize) The number of threads used by the route controller scheduled thread pool that are used for restarting routes.withRouteControllerUnhealthyOnExhausted(boolean unhealthyOnExhausted) Whether to mark the route as unhealthy (down) when all restarting attempts (backoff) have failed and the route is not successfully started and the route manager is giving up.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.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 areInputStreamis 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 areInputStreamis 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] -
isDebugging
public boolean isDebugging() -
setDebugging
public void setDebugging(boolean debugging) Sets whether debugging is enabled or not. Default is false. -
isBacklogTracing
public boolean isBacklogTracing() -
setBacklogTracing
public void setBacklogTracing(boolean backlogTracing) Sets whether backlog tracing is enabled or not. Default is false. -
isBacklogTracingStandby
public boolean isBacklogTracingStandby() -
setBacklogTracingStandby
public void setBacklogTracingStandby(boolean backlogTracingStandby) Whether to set backlog tracing on standby. If on standby then the backlog tracer is installed and made available. Then the backlog tracer can be enabled later at runtime via JMX or via Java API. Default is false. -
isBacklogTracingTemplates
public boolean isBacklogTracingTemplates() -
setBacklogTracingTemplates
public void setBacklogTracingTemplates(boolean backlogTracingTemplates) Whether backlog 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. -
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,Consumeetc 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# -
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. -
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. -
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. -
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. -
isRouteControllerSuperviseEnabled
public boolean isRouteControllerSuperviseEnabled() -
setRouteControllerSuperviseEnabled
public void setRouteControllerSuperviseEnabled(boolean routeControllerSuperviseEnabled) To enable using supervising route controller which allows Camel to startup and then the controller takes care of starting the routes in a safe manner. This can be used when you want to startup Camel despite a route may otherwise fail fast during startup and cause Camel to fail to startup as well. By delegating the route startup to the supervising route controller then its manages the startup using a background thread. The controller allows to be configured with various settings to attempt to restart failing routes. -
getRouteControllerIncludeRoutes
-
setRouteControllerIncludeRoutes
Pattern for filtering routes to be included as supervised. The pattern is matching on route id, and endpoint uri for the route. Multiple patterns can be separated by comma. For example to include all kafka routes, you can say kafka:*. And to include routes with specific route ids myRoute,myOtherRoute. The pattern supports wildcards and uses the matcher from org.apache.camel.support.PatternHelper#matchPattern. -
getRouteControllerExcludeRoutes
-
setRouteControllerExcludeRoutes
Pattern for filtering routes to be excluded as supervised. The pattern is matching on route id, and endpoint uri for the route. Multiple patterns can be separated by comma. For example to exclude all JMS routes, you can say jms:*. And to exclude routes with specific route ids mySpecialRoute,myOtherSpecialRoute. The pattern supports wildcards and uses the matcher from org.apache.camel.support.PatternHelper#matchPattern. -
getRouteControllerThreadPoolSize
public int getRouteControllerThreadPoolSize() -
setRouteControllerThreadPoolSize
public void setRouteControllerThreadPoolSize(int routeControllerThreadPoolSize) The number of threads used by the route controller scheduled thread pool that are used for restarting routes. The pool uses 1 thread by default, but you can increase this to allow the controller to concurrently attempt to restart multiple routes in case more than one route has problems starting. -
getRouteControllerInitialDelay
public long getRouteControllerInitialDelay() -
setRouteControllerInitialDelay
public void setRouteControllerInitialDelay(long routeControllerInitialDelay) Initial delay in milli seconds before the route controller starts, after CamelContext has been started. -
getRouteControllerBackOffDelay
public long getRouteControllerBackOffDelay() -
setRouteControllerBackOffDelay
public void setRouteControllerBackOffDelay(long routeControllerBackOffDelay) Backoff delay in millis when restarting a route that failed to startup. -
getRouteControllerBackOffMaxDelay
public long getRouteControllerBackOffMaxDelay() -
setRouteControllerBackOffMaxDelay
public void setRouteControllerBackOffMaxDelay(long routeControllerBackOffMaxDelay) Backoff maximum delay in millis when restarting a route that failed to startup. -
getRouteControllerBackOffMaxElapsedTime
public long getRouteControllerBackOffMaxElapsedTime() -
setRouteControllerBackOffMaxElapsedTime
public void setRouteControllerBackOffMaxElapsedTime(long routeControllerBackOffMaxElapsedTime) Backoff maximum elapsed time in millis, after which the backoff should be considered exhausted and no more attempts should be made. -
getRouteControllerBackOffMaxAttempts
public long getRouteControllerBackOffMaxAttempts() -
setRouteControllerBackOffMaxAttempts
public void setRouteControllerBackOffMaxAttempts(long routeControllerBackOffMaxAttempts) Backoff maximum number of attempts to restart a route that failed to startup. When this threshold has been exceeded then the controller will give up attempting to restart the route, and the route will remain as stopped. -
getRouteControllerBackOffMultiplier
public double getRouteControllerBackOffMultiplier() -
setRouteControllerBackOffMultiplier
public void setRouteControllerBackOffMultiplier(double routeControllerBackOffMultiplier) Backoff multiplier to use for exponential backoff. This is used to extend the delay between restart attempts. -
isRouteControllerUnhealthyOnExhausted
public boolean isRouteControllerUnhealthyOnExhausted() -
setRouteControllerUnhealthyOnExhausted
public void setRouteControllerUnhealthyOnExhausted(boolean routeControllerUnhealthyOnExhausted) Whether to mark the route as unhealthy (down) when all restarting attempts (backoff) have failed and the route is not successfully started and the route manager is giving up. Setting this to true allows health checks to know about this and can report the Camel application as DOWN. The default is false. -
getStartupRecorder
-
setStartupRecorder
To use startup recorder for capturing execution time during starting Camel. The recorder can be one of: false (or off), logging, 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 areInputStreamis 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 areInputStreamis 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. -
withBacklogTracing
Sets whether backlog tracing is enabled or not. Default is false. -
withBacklogTracingStandby
Whether to set backlog tracing on standby. If on standby then the backlog tracer is installed and made available. Then the backlog tracer can be enabled later at runtime via JMX or via Java API. Default is false. -
withBacklogTracingTemplates
Whether backlog 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,Consumeetc 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# -
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] -
withDebugging
Sets whether debugging is enabled or not. Default is false. -
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. -
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. -
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. -
withRouteControllerSuperviseEnabled
To enable using supervising route controller which allows Camel to startup and then the controller takes care of starting the routes in a safe manner. This can be used when you want to startup Camel despite a route may otherwise fail fast during startup and cause Camel to fail to startup as well. By delegating the route startup to the supervising route controller then its manages the startup using a background thread. The controller allows to be configured with various settings to attempt to restart failing routes. -
withRouteControllerInitialDelay
Initial delay in milli seconds before the route controller starts, after CamelContext has been started. -
withRouteControllerBackOffDelay
Backoff delay in millis when restarting a route that failed to startup. -
withRouteControllerBackOffMaxDelay
Backoff maximum delay in millis when restarting a route that failed to startup. -
withRouteControllerBackOffMaxElapsedTime
Backoff maximum elapsed time in millis, after which the backoff should be considered exhausted and no more attempts should be made. -
withRouteControllerBackOffMaxAttempts
Backoff maximum number of attempts to restart a route that failed to startup. When this threshold has been exceeded then the controller will give up attempting to restart the route, and the route will remain as stopped. -
withRouteControllerBackOffMultiplier
Backoff multiplier to use for exponential backoff. This is used to extend the delay between restart attempts. -
withRouteControllerThreadPoolSize
The number of threads used by the route controller scheduled thread pool that are used for restarting routes. The pool uses 1 thread by default, but you can increase this to allow the controller to concurrently attempt to restart multiple routes in case more than one route has problems starting. -
withRouteControllerIncludeRoutes
Pattern for filtering routes to be included as supervised. The pattern is matching on route id, and endpoint uri for the route. Multiple patterns can be separated by comma. For example to include all kafka routes, you can say kafka:*. And to include routes with specific route ids myRoute,myOtherRoute. The pattern supports wildcards and uses the matcher from org.apache.camel.support.PatternHelper#matchPattern. -
withRouteControllerExcludeRoutes
Pattern for filtering routes to be excluded as supervised. The pattern is matching on route id, and endpoint uri for the route. Multiple patterns can be separated by comma. For example to exclude all JMS routes, you can say jms:*. And to exclude routes with specific route ids mySpecialRoute,myOtherSpecialRoute. The pattern supports wildcards and uses the matcher from org.apache.camel.support.PatternHelper#matchPattern. -
withRouteControllerUnhealthyOnExhausted
Whether to mark the route as unhealthy (down) when all restarting attempts (backoff) have failed and the route is not successfully started and the route manager is giving up. Setting this to true allows health checks to know about this and can report the Camel application as DOWN. The default is false. -
withStartupRecorder
To use startup recorder for capturing execution time during starting Camel. The recorder can be one of: false (or off), logging, 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.
-