Class DefaultConfigurationProperties<T>

java.lang.Object
org.apache.camel.main.DefaultConfigurationProperties<T>
Direct Known Subclasses:
MainConfigurationProperties

public abstract class DefaultConfigurationProperties<T> extends Object
Common set of configuration options used by Camel Main, Camel Spring Boot and other runtimes.
  • Constructor Details

    • DefaultConfigurationProperties

      public DefaultConfigurationProperties()
  • Method Details

    • getName

      public String getName()
    • setName

      public void setName(String name)
      Sets the name of the CamelContext.
    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description)
      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

      public String getDurationMaxAction()
    • setDurationMaxAction

      public void setDurationMaxAction(String durationMaxAction)
      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

      public String getFileConfigurations()
    • setFileConfigurations

      public void setFileConfigurations(String fileConfigurations)
      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

      public String getUuidGenerator()
    • setUuidGenerator

      public void setUuidGenerator(String uuidGenerator)
      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

      public String getStreamCachingAllowClasses()
    • setStreamCachingAllowClasses

      public void setStreamCachingAllowClasses(String streamCachingAllowClasses)
      To filter stream caching of a given set of allowed/denied classes. By default, all classes that are InputStream is allowed. Multiple class names can be separated by comma.
    • getStreamCachingDenyClasses

      public String getStreamCachingDenyClasses()
    • setStreamCachingDenyClasses

      public void setStreamCachingDenyClasses(String streamCachingDenyClasses)
      To filter stream caching of a given set of allowed/denied classes. By default, all classes that are InputStream is allowed. Multiple class names can be separated by comma.
    • isStreamCachingSpoolEnabled

      public boolean isStreamCachingSpoolEnabled()
    • setStreamCachingSpoolEnabled

      public void setStreamCachingSpoolEnabled(boolean streamCachingSpoolEnabled)
      To enable stream caching spooling to disk. This means, for large stream messages (over 128 KB by default) will be cached in a temporary file instead, and Camel will handle deleting the temporary file once the cached stream is no longer necessary. Default is false.
    • getStreamCachingSpoolDirectory

      public String getStreamCachingSpoolDirectory()
    • setStreamCachingSpoolDirectory

      public void setStreamCachingSpoolDirectory(String streamCachingSpoolDirectory)
      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

      public String getStreamCachingSpoolCipher()
    • setStreamCachingSpoolCipher

      public void setStreamCachingSpoolCipher(String streamCachingSpoolCipher)
      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

      public String getStreamCachingSpoolUsedHeapMemoryLimit()
    • setStreamCachingSpoolUsedHeapMemoryLimit

      public void setStreamCachingSpoolUsedHeapMemoryLimit(String streamCachingSpoolUsedHeapMemoryLimit)
      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 via Tracer.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

      public String getTracingPattern()
    • setTracingPattern

      public void setTracingPattern(String tracingPattern)
      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

      public String getTracingLoggingFormat()
    • setTracingLoggingFormat

      public void setTracingLoggingFormat(String format)
      To use a custom tracing logging format. The default format (arrow, routeId, label) is: %-4.4s [%-12.12s] [%-33.33s]
    • isMessageHistory

      public boolean isMessageHistory()
    • setMessageHistory

      public void setMessageHistory(boolean messageHistory)
      Sets whether message history is enabled or not. Default is false.
    • isSourceLocationEnabled

      public boolean isSourceLocationEnabled()
    • setSourceLocationEnabled

      public void setSourceLocationEnabled(boolean sourceLocationEnabled)
      Whether to capture precise source location:line-number for all EIPs in Camel routes. Enabling this will impact parsing Java based routes (also Groovy, Kotlin, etc.) on startup as this uses JDK StackTraceElement to calculate the location from the Camel route, which comes with a performance cost. This only impact startup, not the performance of the routes at runtime.
    • isLogMask

      public boolean isLogMask()
    • setLogMask

      public void setLogMask(boolean logMask)
      Sets whether log mask is enabled or not. Default is false.
    • isLogExhaustedMessageBody

      public boolean isLogExhaustedMessageBody()
    • setLogExhaustedMessageBody

      public void setLogExhaustedMessageBody(boolean logExhaustedMessageBody)
      Sets whether to log exhausted message body with message history. Default is false.
    • isAutoStartup

      public boolean isAutoStartup()
    • setAutoStartup

      public void setAutoStartup(boolean autoStartup)
      Sets whether the object should automatically start when Camel starts. Important: Currently only routes can be disabled, as CamelContext's are always started. Note: When setting auto startup false on CamelContext then that takes precedence and no routes are started. You would need to start CamelContext explicit using the org.apache.camel.CamelContext.start() method, to start the context, and then you would need to start the routes manually using CamelContext.getRouteController().startRoute(String). Default is true to always start up.
    • isAllowUseOriginalMessage

      public boolean isAllowUseOriginalMessage()
    • setAllowUseOriginalMessage

      public void setAllowUseOriginalMessage(boolean allowUseOriginalMessage)
      Sets whether to allow access to the original message from Camel's error handler, or from org.apache.camel.spi.UnitOfWork.getOriginalInMessage(). Turning this off can optimize performance, as defensive copy of the original message is not needed. Default is false.
    • isCaseInsensitiveHeaders

      public boolean isCaseInsensitiveHeaders()
    • setCaseInsensitiveHeaders

      public void setCaseInsensitiveHeaders(boolean caseInsensitiveHeaders)
      Whether to use case sensitive or insensitive headers. Important: When using case sensitive (this is set to false). Then the map is case sensitive which means headers such as content-type and Content-Type are two different keys which can be a problem for some protocols such as HTTP based, which rely on case insensitive headers. However case sensitive implementations can yield faster performance. Therefore use case sensitive implementation with care. Default is true.
    • isAutowiredEnabled

      public boolean isAutowiredEnabled()
    • setAutowiredEnabled

      public void setAutowiredEnabled(boolean autowiredEnabled)
      Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. Default is true.
    • isEndpointRuntimeStatisticsEnabled

      public boolean isEndpointRuntimeStatisticsEnabled()
    • setEndpointRuntimeStatisticsEnabled

      public void setEndpointRuntimeStatisticsEnabled(boolean endpointRuntimeStatisticsEnabled)
      Sets whether endpoint runtime statistics is enabled (gathers runtime usage of each incoming and outgoing endpoints). The default value is false.
    • isLoadStatisticsEnabled

      public boolean isLoadStatisticsEnabled()
    • setLoadStatisticsEnabled

      public void setLoadStatisticsEnabled(boolean loadStatisticsEnabled)
      Sets whether context load statistics is enabled (something like the unix load average). The statistics requires to have camel-management on the classpath as JMX is required. The default value is false.
    • isEndpointLazyStartProducer

      public boolean isEndpointLazyStartProducer()
    • setEndpointLazyStartProducer

      public void setEndpointLazyStartProducer(boolean endpointLazyStartProducer)
      Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. The default value is false.
    • isEndpointBridgeErrorHandler

      public boolean isEndpointBridgeErrorHandler()
    • setEndpointBridgeErrorHandler

      public void setEndpointBridgeErrorHandler(boolean endpointBridgeErrorHandler)
      Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler.

      By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN/ERROR level and ignored. The default value is false.

    • isUseDataType

      public boolean isUseDataType()
    • setUseDataType

      public void setUseDataType(boolean useDataType)
      Whether to enable using data type on Camel messages. Data type are automatic turned on if one ore more routes has been explicit configured with input and output types. Otherwise data type is default off.
    • isUseBreadcrumb

      public boolean isUseBreadcrumb()
    • setUseBreadcrumb

      public void setUseBreadcrumb(boolean useBreadcrumb)
      Set whether breadcrumb is enabled. The default value is false.
    • isBeanPostProcessorEnabled

      public boolean isBeanPostProcessorEnabled()
    • setBeanPostProcessorEnabled

      public void setBeanPostProcessorEnabled(boolean beanPostProcessorEnabled)
      Can be used to turn off bean post processing. Be careful to turn this off, as this means that beans that use Camel annotations such as EndpointInject, ProducerTemplate, Produce, Consume etc will not be injected and in use. Turning this off should only be done if you are sure you do not use any of these Camel features. Not all runtimes allow turning this off (such as camel-blueprint or camel-cdi with XML). The default value is true (enabled).
    • getJmxManagementMBeansLevel

      public org.apache.camel.ManagementMBeansLevel getJmxManagementMBeansLevel()
    • setJmxManagementMBeansLevel

      public void setJmxManagementMBeansLevel(org.apache.camel.ManagementMBeansLevel jmxManagementMBeansLevel)
      Sets the mbeans registration level. The default value is Default.
    • getJmxManagementStatisticsLevel

      public org.apache.camel.ManagementStatisticsLevel getJmxManagementStatisticsLevel()
    • setJmxManagementStatisticsLevel

      public void setJmxManagementStatisticsLevel(org.apache.camel.ManagementStatisticsLevel jmxManagementStatisticsLevel)
      Sets the JMX statistics level, the level can be set to Extended to gather additional information The default value is Default.
    • getJmxManagementNamePattern

      public String getJmxManagementNamePattern()
    • setJmxManagementNamePattern

      public void setJmxManagementNamePattern(String jmxManagementNamePattern)
      The naming pattern for creating the CamelContext JMX management name. The default pattern is #name#
    • isJmxManagementRegisterRoutesCreateByKamelet

      public boolean isJmxManagementRegisterRoutesCreateByKamelet()
    • setJmxManagementRegisterRoutesCreateByKamelet

      public void setJmxManagementRegisterRoutesCreateByKamelet(boolean jmxManagementRegisterRoutesCreateByKamelet)
      Whether routes created by Kamelets should be registered for JMX management. Enabling this allows to have fine-grained monitoring and management of every route created via Kamelets. This is default disabled as a Kamelet is intended as a component (black-box) and its implementation details as Camel route makes the overall management and monitoring of Camel applications more verbose. During development of Kamelets then enabling this will make it possible for developers to do fine-grained performance inspection and identify potential bottlenecks in the Kamelet routes. However, for production usage then keeping this disabled is recommended.
    • isJmxManagementRegisterRoutesCreateByTemplate

      public boolean isJmxManagementRegisterRoutesCreateByTemplate()
    • setJmxManagementRegisterRoutesCreateByTemplate

      public void setJmxManagementRegisterRoutesCreateByTemplate(boolean jmxManagementRegisterRoutesCreateByTemplate)
      Whether routes created by route templates (not Kamelets) should be registered for JMX management. Enabling this allows to have fine-grained monitoring and management of every route created via route templates. This is default enabled (unlike Kamelets) as routes created via templates is regarded as standard routes, and should be available for management and monitoring.
    • isCamelEventsTimestampEnabled

      public boolean isCamelEventsTimestampEnabled()
    • setCamelEventsTimestampEnabled

      public void setCamelEventsTimestampEnabled(boolean camelEventsTimestampEnabled)
      Whether to include timestamps for all emitted Camel Events. Enabling this allows to know fine-grained at what time each event was emitted, which can be used for reporting to report exactly the time of the events. This is by default false to avoid the overhead of including this information.
    • isUseMdcLogging

      public boolean isUseMdcLogging()
    • setUseMdcLogging

      public void setUseMdcLogging(boolean useMdcLogging)
      To turn on MDC logging
    • getMdcLoggingKeysPattern

      public String getMdcLoggingKeysPattern()
    • setMdcLoggingKeysPattern

      public void setMdcLoggingKeysPattern(String mdcLoggingKeysPattern)
      Sets the pattern used for determine which custom MDC keys to propagate during message routing when the routing engine continues routing asynchronously for the given message. 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

      public String getThreadNamePattern()
    • setThreadNamePattern

      public void setThreadNamePattern(String threadNamePattern)
      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

      public String getRouteFilterIncludePattern()
    • setRouteFilterIncludePattern

      public void setRouteFilterIncludePattern(String include)
      Used for filtering routes matching the given pattern, which follows the following rules: - Match by route id - Match by route input endpoint uri The matching is using exact match, by wildcard and regular expression as documented by PatternHelper.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

      public String getRouteFilterExcludePattern()
    • setRouteFilterExcludePattern

      public void setRouteFilterExcludePattern(String exclude)
      Used for filtering routes routes matching the given pattern, which follows the following rules: - Match by route id - Match by route input endpoint uri The matching is using exact match, by wildcard and regular expression as documented by PatternHelper.matchPattern(String, String). For example to only include routes which starts with foo in their route id's, use: include=foo* And to exclude routes which starts from JMS endpoints, use: exclude=jms:* Multiple patterns can be separated by comma, for example to exclude both foo and bar routes, use: exclude=foo*,bar* Exclude takes precedence over include.
    • isBeanIntrospectionExtendedStatistics

      public boolean isBeanIntrospectionExtendedStatistics()
    • setBeanIntrospectionExtendedStatistics

      public void setBeanIntrospectionExtendedStatistics(boolean beanIntrospectionExtendedStatistics)
      Sets whether bean introspection uses extended statistics. The default is false.
    • getBeanIntrospectionLoggingLevel

      public org.apache.camel.LoggingLevel getBeanIntrospectionLoggingLevel()
    • setBeanIntrospectionLoggingLevel

      public void setBeanIntrospectionLoggingLevel(org.apache.camel.LoggingLevel beanIntrospectionLoggingLevel)
      Sets the logging level used by bean introspection, logging activity of its usage. The default is TRACE.
    • isRoutesCollectorEnabled

      public boolean isRoutesCollectorEnabled()
    • setRoutesCollectorEnabled

      public void setRoutesCollectorEnabled(boolean routesCollectorEnabled)
      Whether the routes collector is enabled or not. When enabled Camel will auto-discover routes (RouteBuilder instances from the registry and also load additional routes from the file system). The routes collector is default enabled.
    • isRoutesCollectorIgnoreLoadingError

      public boolean isRoutesCollectorIgnoreLoadingError()
    • setRoutesCollectorIgnoreLoadingError

      public void setRoutesCollectorIgnoreLoadingError(boolean routesCollectorIgnoreLoadingError)
      Whether the routes collector should ignore any errors during loading and compiling routes. This is only intended for development or tooling.
    • getCompileWorkDir

      public String getCompileWorkDir()
    • setCompileWorkDir

      public void setCompileWorkDir(String compileWorkDir)
      Work directory for compiler. Can be used to write compiled classes or other resources.
    • getJavaRoutesIncludePattern

      public String getJavaRoutesIncludePattern()
    • setJavaRoutesIncludePattern

      public void setJavaRoutesIncludePattern(String javaRoutesIncludePattern)
      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

      public String getJavaRoutesExcludePattern()
    • setJavaRoutesExcludePattern

      public void setJavaRoutesExcludePattern(String javaRoutesExcludePattern)
      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

      public String getRoutesIncludePattern()
    • setRoutesIncludePattern

      public void setRoutesIncludePattern(String routesIncludePattern)
      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

      public String getRoutesExcludePattern()
    • setRoutesExcludePattern

      public void setRoutesExcludePattern(String routesExcludePattern)
      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

      public String getRoutesReloadDirectory()
    • setRoutesReloadDirectory

      public void setRoutesReloadDirectory(String routesReloadDirectory)
      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

      public String getRoutesReloadPattern()
    • setRoutesReloadPattern

      public void setRoutesReloadPattern(String routesReloadPattern)
      Used for inclusive filtering of routes from directories. Typical used for specifying to accept routes in XML or YAML files, such as *.yaml,*.xml. Multiple patterns can be specified separated by comma.
    • isRoutesReloadRemoveAllRoutes

      public boolean isRoutesReloadRemoveAllRoutes()
    • setRoutesReloadRemoveAllRoutes

      public void setRoutesReloadRemoveAllRoutes(boolean routesReloadRemoveAllRoutes)
      When reloading routes should all existing routes be stopped and removed. By default, Camel will stop and remove all existing routes before reloading routes. This ensures that only the reloaded routes will be active. If disabled then only routes with the same route id is updated, and any existing routes are continued to run.
    • isRoutesReloadRestartDuration

      public boolean isRoutesReloadRestartDuration()
    • setRoutesReloadRestartDuration

      public void setRoutesReloadRestartDuration(boolean routesReloadRestartDuration)
      Whether to restart max duration when routes are reloaded. For example if max duration is 60 seconds, and a route is reloaded after 25 seconds, then this will restart the count and wait 60 seconds again.
    • isJmxUpdateRouteEnabled

      public boolean isJmxUpdateRouteEnabled()
    • setJmxUpdateRouteEnabled

      public void setJmxUpdateRouteEnabled(boolean jmxUpdateRouteEnabled)
      Whether to allow updating routes at runtime via JMX using the ManagedRouteMBean. This is disabled by default, but can be enabled for development and troubleshooting purposes, such as updating routes in an existing running Camel via JMX and other tools.
    • isLightweight

      public boolean isLightweight()
    • setLightweight

      public void setLightweight(boolean lightweight)
      Configure the context to be lightweight. This will trigger some optimizations and memory reduction options. Lightweight context have some limitations. At this moment, dynamic endpoint destinations are not supported.
    • getExchangeFactory

      public String getExchangeFactory()
    • setExchangeFactory

      public void setExchangeFactory(String exchangeFactory)
      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

      public String getDumpRoutes()
    • setDumpRoutes

      public void setDumpRoutes(String dumpRoutes)
      If dumping is enabled then Camel will during startup dump all loaded routes (incl rests and route templates) represented as XML/YAML DSL into the log. This is intended for trouble shooting or to assist during development. Sensitive information that may be configured in the route endpoints could potentially be included in the dump output and is therefore not recommended being used for production usage. This requires to have camel-xml-io/camel-yaml-io on the classpath to be able to dump the routes as XML/YAML.
    • getDumpRoutesInclude

      public String getDumpRoutesInclude()
    • setDumpRoutesInclude

      public void setDumpRoutesInclude(String dumpRoutesInclude)
      Controls what to include in output for route dumping. Possible values: all, routes, rests, routeConfigurations, routeTemplates, beans. Multiple values can be separated by comma. Default is routes.
    • isDumpRoutesLog

      public boolean isDumpRoutesLog()
    • setDumpRoutesLog

      public void setDumpRoutesLog(boolean dumpRoutesLog)
      Whether to log route dumps to Logger
    • isDumpRoutesResolvePlaceholders

      public boolean isDumpRoutesResolvePlaceholders()
    • setDumpRoutesResolvePlaceholders

      public void setDumpRoutesResolvePlaceholders(boolean dumpRoutesResolvePlaceholders)
      Whether to resolve property placeholders in the dumped output. Default is true.
    • isDumpRoutesUriAsParameters

      public boolean isDumpRoutesUriAsParameters()
    • setDumpRoutesUriAsParameters

      public void setDumpRoutesUriAsParameters(boolean dumpRoutesUriAsParameters)
      When dumping routes to YAML format, then this option controls whether endpoint URIs should be expanded into a key/value parameters.
    • isDumpRoutesGeneratedIds

      public boolean isDumpRoutesGeneratedIds()
    • setDumpRoutesGeneratedIds

      public void setDumpRoutesGeneratedIds(boolean dumpRoutesGeneratedIds)
      Whether to include auto generated IDs in the dumped output. Default is false.
    • getDumpRoutesOutput

      public String getDumpRoutesOutput()
    • setDumpRoutesOutput

      public void setDumpRoutesOutput(String dumpRoutesOutput)
      Whether to save route dumps to an output file. If the output is a filename, then all content is saved to this file. If the output is a directory name, then one or more files are saved to the directory, where the names are based on the original source file names, or auto generated names.
    • getGlobalOptions

      public Map<String,String> getGlobalOptions()
    • setGlobalOptions

      public void setGlobalOptions(Map<String,String> globalOptions)
      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

      public void addGlobalOption(String key, Object value)
      Adds a global options that can be referenced in the camel context

      Important: This has nothing to do with property placeholders, and is just a plain set of key/value pairs which are used to configure global options on CamelContext, such as a maximum debug logging length etc.

    • getStartupRecorder

      public String getStartupRecorder()
    • setStartupRecorder

      public void setStartupRecorder(String startupRecorder)
      To use startup recorder for capturing execution time during starting Camel. The recorder can be one of: false (or off), logging, backlog, java-flight-recorder (or jfr).
    • getStartupRecorderMaxDepth

      public int getStartupRecorderMaxDepth()
    • setStartupRecorderMaxDepth

      public void setStartupRecorderMaxDepth(int startupRecorderMaxDepth)
      To filter our sub steps at a maximum depth. Use -1 for no maximum. Use 0 for no sub steps. Use 1 for max 1 sub step, and so forth. The default is -1.
    • isStartupRecorderRecording

      public boolean isStartupRecorderRecording()
    • setStartupRecorderRecording

      public void setStartupRecorderRecording(boolean startupRecorderRecording)
      To enable Java Flight Recorder to start a recording and automatic dump the recording to disk after startup is complete. This requires that camel-jfr is on the classpath, and to enable this option.
    • getStartupRecorderProfile

      public String getStartupRecorderProfile()
    • setStartupRecorderProfile

      public void setStartupRecorderProfile(String startupRecorderProfile)
      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

      public String getStartupRecorderDir()
    • setStartupRecorderDir

      public void setStartupRecorderDir(String startupRecorderDir)
      Directory to store the recording. By default the current directory will be used. Use false to turn off saving recording to disk.
    • withName

      public T withName(String name)
      Sets the name of the CamelContext.
    • withDescription

      public T withDescription(String description)
      Sets the description (intended for humans) of the Camel application.
    • withDurationMaxSeconds

      public T withDurationMaxSeconds(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.
    • withDurationMaxIdleSeconds

      public T withDurationMaxIdleSeconds(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.
    • withDurationMaxMessages

      public T withDurationMaxMessages(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.
    • withDurationMaxAction

      public T withDurationMaxAction(String durationMaxAction)
      Controls whether the Camel application should shutdown the JVM, or stop all routes, when duration max is triggered.
    • withShutdownTimeout

      public T withShutdownTimeout(int shutdownTimeout)
      Timeout in seconds to graceful shutdown all the Camel routes.
    • withShutdownSuppressLoggingOnTimeout

      public T withShutdownSuppressLoggingOnTimeout(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.
    • withShutdownNowOnTimeout

      public T 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. 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

      public T withShutdownRoutesInReverseOrder(boolean shutdownRoutesInReverseOrder)
      Sets whether routes should be shutdown in reverse or the same order as they where started.
    • withShutdownLogInflightExchangesOnTimeout

      public T 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. This requires to enable the option inflightRepositoryExchangeEnabled.
    • withInflightRepositoryBrowseEnabled

      public T withInflightRepositoryBrowseEnabled(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.
    • withFileConfigurations

      public T withFileConfigurations(String fileConfigurations)
      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

      public T withJmxEnabled(boolean jmxEnabled)
      Enable JMX in your Camel application.
    • withProducerTemplateCacheSize

      public T withProducerTemplateCacheSize(int producerTemplateCacheSize)
      Producer template endpoints cache size.
    • withConsumerTemplateCacheSize

      public T withConsumerTemplateCacheSize(int consumerTemplateCacheSize)
      Consumer template endpoints cache size.
    • withLoadTypeConverters

      public T withLoadTypeConverters(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.
    • withLoadHealthChecks

      public T withLoadHealthChecks(boolean loadHealthChecks)
      Whether to load custom health checks by scanning classpath.
    • withModeline

      public T withModeline(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.
    • withDevConsoleEnabled

      public T withDevConsoleEnabled(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.
    • withLogDebugMaxChars

      public T withLogDebugMaxChars(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.
    • withStreamCachingEnabled

      public T withStreamCachingEnabled(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.
    • withStreamCachingAllowClasses

      public T withStreamCachingAllowClasses(String streamCachingAllowClasses)
      To filter stream caching of a given set of allowed/denied classes. By default, all classes that are InputStream is allowed. Multiple class names can be separated by comma.
    • withStreamCachingDenyClasses

      public T withStreamCachingDenyClasses(String streamCachingDenyClasses)
      To filter stream caching of a given set of allowed/denied classes. By default, all classes that are InputStream is allowed. Multiple class names can be separated by comma.
    • withStreamCachingSpoolEnabled

      public T withStreamCachingSpoolEnabled(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.
    • withStreamCachingSpoolDirectory

      public T withStreamCachingSpoolDirectory(String streamCachingSpoolDirectory)
      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

      public T withStreamCachingSpoolCipher(String streamCachingSpoolCipher)
      Sets a stream caching cipher name to use when spooling to disk to write with encryption. By default the data is not encrypted.
    • withStreamCachingSpoolThreshold

      public T withStreamCachingSpoolThreshold(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.
    • withStreamCachingSpoolUsedHeapMemoryThreshold

      public T withStreamCachingSpoolUsedHeapMemoryThreshold(int streamCachingSpoolUsedHeapMemoryThreshold)
      Sets a percentage (1-99) of used heap memory threshold to activate stream caching spooling to disk.
    • withStreamCachingSpoolUsedHeapMemoryLimit

      public T withStreamCachingSpoolUsedHeapMemoryLimit(String streamCachingSpoolUsedHeapMemoryLimit)
      Sets what the upper bounds should be when streamCachingSpoolUsedHeapMemoryThreshold is in use.
    • withStreamCachingAnySpoolRules

      public T 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. 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

      public T withStreamCachingBufferSize(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.
    • withStreamCachingRemoveSpoolDirectoryWhenStopping

      public T withStreamCachingRemoveSpoolDirectoryWhenStopping(boolean streamCachingRemoveSpoolDirectoryWhenStopping)
      Whether to remove stream caching temporary directory when stopping. This option is default true.
    • withStreamCachingStatisticsEnabled

      public T withStreamCachingStatisticsEnabled(boolean streamCachingStatisticsEnabled)
      Sets whether stream caching statistics is enabled.
    • withTypeConverterStatisticsEnabled

      public T withTypeConverterStatisticsEnabled(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.
    • withTracing

      public T withTracing(boolean tracing)
      Sets whether tracing is enabled or not. Default is false.
    • withTracingStandby

      public T withTracingStandby(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 via Tracer.setEnabled(boolean). Default is false.
    • withTracingTemplates

      public T withTracingTemplates(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.
    • withMessageHistory

      public T withMessageHistory(boolean messageHistory)
      Sets whether message history is enabled or not. Default is false.
    • withSourceLocationEnabled

      public T withSourceLocationEnabled(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.
    • withLogMask

      public T withLogMask(boolean logMask)
      Sets whether log mask is enabled or not. Default is false.
    • withLogExhaustedMessageBody

      public T withLogExhaustedMessageBody(boolean logExhaustedMessageBody)
      Sets whether to log exhausted message body with message history. Default is false.
    • withAutoStartup

      public T withAutoStartup(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 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

      public T 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(). Turning this off can optimize performance, as defensive copy of the original message is not needed. Default is false.
    • withCaseInsensitiveHeaders

      public T withCaseInsensitiveHeaders(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.
    • withEndpointRuntimeStatisticsEnabled

      public T withEndpointRuntimeStatisticsEnabled(boolean endpointRuntimeStatisticsEnabled)
      Sets whether endpoint runtime statistics is enabled (gathers runtime usage of each incoming and outgoing endpoints). The default value is false.
    • withLoadStatisticsEnabled

      public T withLoadStatisticsEnabled(boolean loadStatisticsEnabled)
      Sets whether context load statistics is enabled (something like the unix load average). The default value is false.
    • withEndpointLazyStartProducer

      public T withEndpointLazyStartProducer(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.
    • withEndpointBridgeErrorHandler

      public T 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.

      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

      public T withUseDataType(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.
    • withUseBreadcrumb

      public T withUseBreadcrumb(boolean useBreadcrumb)
      Set whether breadcrumb is enabled. The default value is false.
    • withBeanPostProcessorEnabled

      public T withBeanPostProcessorEnabled(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 as EndpointInject, ProducerTemplate, Produce, Consume etc will not be injected and in use. Turning this off should only be done if you are sure you do not use any of these Camel features. Not all runtimes allow turning this off (such as camel-blueprint or camel-cdi with XML). The default value is true (enabled).
    • withJmxManagementMBeansLevel

      public T withJmxManagementMBeansLevel(org.apache.camel.ManagementMBeansLevel jmxManagementMBeansLevel)
      Sets the mbeans registration level. The default value is Default.
    • withJmxManagementStatisticsLevel

      public T withJmxManagementStatisticsLevel(org.apache.camel.ManagementStatisticsLevel jmxManagementStatisticsLevel)
      Sets the JMX statistics level The level can be set to Extended to gather additional information The default value is Default.
    • withJmxManagementNamePattern

      public T withJmxManagementNamePattern(String jmxManagementNamePattern)
      The naming pattern for creating the CamelContext JMX management name. The default pattern is #name#
    • withJmxManagementRegisterRoutesCreateByKamelet

      public T withJmxManagementRegisterRoutesCreateByKamelet(boolean jmxManagementRegisterRoutesCreateByKamelet)
      Whether routes created by Kamelets should be registered for JMX management. Enabling this allows to have fine-grained monitoring and management of every route created via Kamelets. This is default disabled as a Kamelet is intended as a component (black-box) and its implementation details as Camel route makes the overall management and monitoring of Camel applications more verbose. During development of Kamelets then enabling this will make it possible for developers to do fine-grained performance inspection and identify potential bottlenecks in the Kamelet routes. However, for production usage then keeping this disabled is recommended.
    • withJmxManagementRegisterRoutesCreateByTemplate

      public T withJmxManagementRegisterRoutesCreateByTemplate(boolean jmxManagementRegisterRoutesCreateByTemplate)
      Whether routes created by route templates (not Kamelets) should be registered for JMX management. Enabling this allows to have fine-grained monitoring and management of every route created via route templates. This is default enabled (unlike Kamelets) as routes created via templates is regarded as standard routes, and should be available for management and monitoring.
    • withCamelEventsTimestampEnabled

      public T withCamelEventsTimestampEnabled(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.
    • withUseMdcLogging

      public T withUseMdcLogging(boolean useMdcLogging)
      To turn on MDC logging
    • withThreadNamePattern

      public T withThreadNamePattern(String threadNamePattern)
      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

      public T 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 by PatternHelper.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

      public T 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 by PatternHelper.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

      public T withBeanIntrospectionExtendedStatistics(boolean beanIntrospectionExtendedStatistics)
      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

      public T withTracingPattern(String tracingPattern)
      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

      public T withTracingLoggingFormat(String format)
      To use a custom tracing logging format. The default format (arrow, routeId, label) is: %-4.4s [%-12.12s] [%-33.33s]
    • withMdcLoggingKeysPattern

      public T 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. 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

      public T withRoutesCollectorEnabled(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 XML routes from the file system. The routes collector is default enabled.
    • withRoutesCollectorIgnoreLoadingError

      public T withRoutesCollectorIgnoreLoadingError(boolean routesCollectorIgnoreLoadingError)
      Whether the routes collector should ignore any errors during loading and compiling routes. This is only intended for development or tooling.
    • withCompileWorkDir

      public T withCompileWorkDir(String compileWorkDir)
      Work directory for compiler. Can be used to write compiled classes or other resources.
    • withJavaRoutesIncludePattern

      public T withJavaRoutesIncludePattern(String javaRoutesIncludePattern)
      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

      public T withJavaRoutesExcludePattern(String javaRoutesExcludePattern)
      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

      public T withRoutesIncludePattern(String routesIncludePattern)
      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

      public T withRoutesExcludePattern(String routesExcludePattern)
      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

      public T withContextReloadEnabled(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.
    • withRoutesReloadEnabled

      public T withRoutesReloadEnabled(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.
    • withRoutesReloadDirectory

      public T withRoutesReloadDirectory(String routesReloadDirectory)
      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

      public T withRoutesReloadDirectoryRecursive(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.
    • withRoutesReloadPattern

      public T withRoutesReloadPattern(String routesReloadPattern)
      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

      public T withRoutesReloadRemoveAllRoutes(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.
    • withRoutesReloadRestartDuration

      public T withRoutesReloadRestartDuration(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.
    • withLightweight

      public T withLightweight(boolean lightweight)
      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

      public T withExchangeFactory(String exchangeFactory)
      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

      public T withExchangeFactoryCapacity(int exchangeFactoryCapacity)
      The capacity the pool (for each consumer) uses for storing exchanges. The default capacity is 100.
    • withExchangeFactoryStatisticsEnabled

      public T withExchangeFactoryStatisticsEnabled(boolean exchangeFactoryStatisticsEnabled)
      Configures whether statistics is enabled on exchange factory.
    • withDumpRoutes

      public T 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. This is intended for trouble shooting or to assist during development. Sensitive information that may be configured in the route endpoints could potentially be included in the dump output and is therefore not recommended being used for production usage. This requires to have camel-xml-io/camel-yaml-io on the classpath to be able to dump the routes as XML/YAML.
    • withDumpRoutesInclude

      public T withDumpRoutesInclude(String dumpRoutesInclude)
      Controls what to include in output for route dumping. Possible values: all, routes, rests, routeConfigurations, routeTemplates, beans. Multiple values can be separated by comma. Default is routes.
    • withDumpRoutesLog

      public T withDumpRoutesLog(boolean dumpRoutesLog)
      Whether to log route dumps to Logger
    • withDumpRoutesResolvePlaceholders

      public T withDumpRoutesResolvePlaceholders(boolean dumpRoutesResolvePlaceholders)
      Whether to resolve property placeholders in the dumped output. Default is true.
    • withDumpRoutesUriAsParameters

      public T withDumpRoutesUriAsParameters(boolean dumpRoutesUriAsParameters)
      When dumping routes to YAML format, then this option controls whether endpoint URIs should be expanded into a key/value parameters.
    • withDumpRoutesGeneratedIds

      public T withDumpRoutesGeneratedIds(boolean dumpRoutesGeneratedIds)
      Whether to include auto generated IDs in the dumped output. Default is false.
    • withDumpRoutesOutput

      public T withDumpRoutesOutput(String dumpRoutesOutput)
      Whether to save route dumps to an output file. If the output is a filename, then all content is saved to this file. If the output is a directory name, then one or more files are saved to the directory, where the names are based on the original source file names, or auto generated names.
    • withGlobalOptions

      public T withGlobalOptions(Map<String,String> globalOptions)
      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

      public T withGlobalOption(String key, String value)
      Sets global options that can be referenced in the camel context

      Important: This has nothing to do with property placeholders, and is just a plain set of key/value pairs which are used to configure global options on CamelContext, such as a maximum debug logging length etc.

    • withStartupRecorder

      public T withStartupRecorder(String startupRecorder)
      To use startup recorder for capturing execution time during starting Camel. The recorder can be one of: false (or off), logging, backlog, java-flight-recorder (or jfr). The default is false.
    • withStartupRecorderMaxDepth

      public T withStartupRecorderMaxDepth(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.
    • withStartupRecorderRecording

      public T withStartupRecorderRecording(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.
    • withStartupRecorderProfile

      public T withStartupRecorderProfile(String startupRecorderProfile)
      To use a specific Java Flight Recorder profile configuration, such as default or profile. The default is default.
    • withStartupRecorderDuration

      public T withStartupRecorderDuration(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)
    • withStartupRecorderDir

      public T withStartupRecorderDir(String startupRecorderDir)
      Directory to store the recording. By default the current directory will be used.