This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new 2540704 CAMEL-15213: camel-main - Add default values to configuration so tooling knows 2540704 is described below commit 254070418eec1a0995fedd508e6bb04afdd28154 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Fri Jun 19 08:21:37 2020 +0200 CAMEL-15213: camel-main - Add default values to configuration so tooling knows --- .../camel-main-configuration-metadata.json | 56 +++++++++++----------- core/camel-main/src/main/docs/main.adoc | 56 +++++++++++----------- .../camel/main/DefaultConfigurationProperties.java | 5 +- .../FaultToleranceConfigurationProperties.java | 11 +++++ .../camel/main/HealthConfigurationProperties.java | 17 ++----- .../camel/main/LraConfigurationProperties.java | 7 ++- .../main/Resilience4jConfigurationProperties.java | 13 +++++ .../maven/packaging/PrepareCamelMainMojo.java | 14 +++++- 8 files changed, 105 insertions(+), 74 deletions(-) diff --git a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json index 0a2a1d6..6a65bbd 100644 --- a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json +++ b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json @@ -41,7 +41,7 @@ { "name": "camel.main.javaRoutesIncludePattern", "description": "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 in [...] { "name": "camel.main.jmxEnabled", "description": "Enable JMX in your Camel application.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": true }, { "name": "camel.main.jmxManagementNamePattern", "description": "The naming pattern for creating the CamelContext JMX management name. The default pattern is #name#", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "string", "javaType": "java.lang.String", "defaultValue": "#name#" }, - { "name": "camel.main.jmxManagementStatisticsLevel", "description": "Sets the JMX statistics level The level can be set to Extended to gather additional information The default value is Default.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "object", "javaType": "org.apache.camel.ManagementStatisticsLevel", "defaultValue": "ManagementStatisticsLevel.Default", "enum": [ "Extended", "Default", "RoutesOnly", "Off" ] }, + { "name": "camel.main.jmxManagementStatisticsLevel", "description": "Sets the JMX statistics level The level can be set to Extended to gather additional information The default value is Default.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "object", "javaType": "org.apache.camel.ManagementStatisticsLevel", "defaultValue": "Default", "enum": [ "Extended", "Default", "RoutesOnly", "Off" ] }, { "name": "camel.main.lightweight", "description": "Experimental: 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.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean" }, { "name": "camel.main.loadTypeConverters", "description": "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.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean" }, { "name": "camel.main.logDebugMaxChars", "description": "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.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", "javaType": "int" }, @@ -60,7 +60,7 @@ { "name": "camel.main.routeControllerExcludeRoutes", "description": "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.", "sour [...] { "name": "camel.main.routeControllerIncludeRoutes", "description": "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#matchPatter [...] { "name": "camel.main.routeControllerInitialDelay", "description": "Initial delay in milli seconds before the route controller starts, after CamelContext has been started.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", "javaType": "long" }, - { "name": "camel.main.routeControllerRouteStartupLoggingLevel", "description": "Sets the logging level used for logging route startup activity. By default INFO level is used. You can use this to change the level for example to OFF if this kind of logging is not wanted.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "object", "javaType": "org.apache.camel.LoggingLevel", "enum": [ "ERROR", "WARN", "INFO", "DEBUG", "TRACE", "OFF" ] }, + { "name": "camel.main.routeControllerRouteStartupLoggingLevel", "description": "Sets the logging level used for logging route startup activity. By default INFO level is used. You can use this to change the level for example to OFF if this kind of logging is not wanted.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "object", "javaType": "org.apache.camel.LoggingLevel", "defaultValue": "INFO", "enum": [ "ERROR", "WARN", "INFO", "DEBUG", "TRACE", "OFF" ] }, { "name": "camel.main.routeControllerSuperviseEnabled", "description": "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 th [...] { "name": "camel.main.routeControllerThreadPoolSize", "description": "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.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", "javaType": "int" }, { "name": "camel.main.routeControllerUnhealthyOnExhausted", "description": "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.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean" }, @@ -92,24 +92,24 @@ { "name": "camel.main.useMdcLogging", "description": "To turn on MDC logging", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean" }, { "name": "camel.main.xmlRests", "description": "Directory to scan for adding additional XML rests. You can turn this off by setting the value to false. Files can be loaded from either classpath or file by prefixing with classpath: or file: Wildcards is supported using a ANT pattern style paths, such as classpath:**\/*camel*.xml Notice when using wildcards, then there is additional overhead as the classpath is scanned, where as if you specific the exact name for each [...] { "name": "camel.main.xmlRoutes", "description": "Directory to scan for adding additional XML routes. You can turn this off by setting the value to false. Files can be loaded from either classpath or file by prefixing with classpath: or file: Wildcards is supported using a ANT pattern style paths, such as classpath:**\/*camel*.xml Notice when using wildcards, then there is additional overhead as the classpath is scanned, where as if you specific the exact name for eac [...] - { "name": "camel.faulttolerance.bulkheadEnabled", "description": "Whether bulkhead is enabled or not on the circuit breaker. Default is false.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean" }, + { "name": "camel.faulttolerance.bulkheadEnabled", "description": "Whether bulkhead is enabled or not on the circuit breaker. Default is false.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean", "defaultValue": false }, { "name": "camel.faulttolerance.bulkheadExecutorServiceRef", "description": "References to a custom thread pool to use when bulkhead is enabled.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, - { "name": "camel.faulttolerance.bulkheadMaxConcurrentCalls", "description": "Configures the max amount of concurrent calls the bulkhead will support. Default value is 10.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer" }, - { "name": "camel.faulttolerance.bulkheadWaitingTaskQueue", "description": "Configures the task queue size for holding waiting tasks to be processed by the bulkhead. Default value is 10.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer" }, + { "name": "camel.faulttolerance.bulkheadMaxConcurrentCalls", "description": "Configures the max amount of concurrent calls the bulkhead will support. Default value is 10.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer", "defaultValue": 10 }, + { "name": "camel.faulttolerance.bulkheadWaitingTaskQueue", "description": "Configures the task queue size for holding waiting tasks to be processed by the bulkhead. Default value is 10.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer", "defaultValue": 10 }, { "name": "camel.faulttolerance.circuitBreakerRef", "description": "Refers to an existing io.smallrye.faulttolerance.core.circuit.breaker.CircuitBreaker instance to lookup and use from the registry. When using this, then any other circuit breaker options are not in use.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, - { "name": "camel.faulttolerance.delay", "description": "Control how long the circuit breaker stays open. The value are in seconds and the default is 5 seconds.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "integer", "javaType": "java.lang.Long" }, - { "name": "camel.faulttolerance.failureRatio", "description": "Configures the failure rate threshold in percentage. If the failure rate is equal or greater than the threshold the CircuitBreaker transitions to open and starts short-circuiting calls. The threshold must be greater than 0 and not greater than 100. Default value is 50 percentage.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer" }, - { "name": "camel.faulttolerance.requestVolumeThreshold", "description": "Controls the size of the rolling window used when the circuit breaker is closed Default value is 20.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer" }, - { "name": "camel.faulttolerance.successThreshold", "description": "Controls the number of trial calls which are allowed when the circuit breaker is half-open Default value is 1.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer" }, - { "name": "camel.faulttolerance.timeoutDuration", "description": "Configures the thread execution timeout. Default value is 1000 milliseconds.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "integer", "javaType": "java.lang.Long" }, - { "name": "camel.faulttolerance.timeoutEnabled", "description": "Whether timeout is enabled or not on the circuit breaker. Default is false.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean" }, - { "name": "camel.faulttolerance.timeoutPoolSize", "description": "Configures the pool size of the thread pool when timeout is enabled. Default value is 10.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer" }, + { "name": "camel.faulttolerance.delay", "description": "Control how long the circuit breaker stays open. The value are in seconds and the default is 5 seconds.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "integer", "javaType": "java.lang.Long", "defaultValue": 5 }, + { "name": "camel.faulttolerance.failureRatio", "description": "Configures the failure rate threshold in percentage. If the failure rate is equal or greater than the threshold the CircuitBreaker transitions to open and starts short-circuiting calls. The threshold must be greater than 0 and not greater than 100. Default value is 50 percentage.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer", "defaultValue [...] + { "name": "camel.faulttolerance.requestVolumeThreshold", "description": "Controls the size of the rolling window used when the circuit breaker is closed Default value is 20.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer", "defaultValue": 20 }, + { "name": "camel.faulttolerance.successThreshold", "description": "Controls the number of trial calls which are allowed when the circuit breaker is half-open Default value is 1.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer", "defaultValue": 1 }, + { "name": "camel.faulttolerance.timeoutDuration", "description": "Configures the thread execution timeout. Default value is 1000 milliseconds.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "integer", "javaType": "java.lang.Long", "defaultValue": 1000 }, + { "name": "camel.faulttolerance.timeoutEnabled", "description": "Whether timeout is enabled or not on the circuit breaker. Default is false.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean", "defaultValue": false }, + { "name": "camel.faulttolerance.timeoutPoolSize", "description": "Configures the pool size of the thread pool when timeout is enabled. Default value is 10.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer", "defaultValue": 10 }, { "name": "camel.faulttolerance.timeoutScheduledExecutorServiceRef", "description": "References to a custom thread pool to use when timeout is enabled", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.health.config", "description": "Set additional HealthConfigurationProperties for fine grained configuration of health checks.", "sourceType": "org.apache.camel.main.HealthConfigurationProperties", "type": "object", "javaType": "java.util.Map" }, - { "name": "camel.health.contextEnabled", "description": "Whether context health check is enabled Is default enabled", "sourceType": "org.apache.camel.main.HealthConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean" }, - { "name": "camel.health.enabled", "description": "Whether health check is enabled globally", "sourceType": "org.apache.camel.main.HealthConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean" }, - { "name": "camel.health.registryEnabled", "description": "Whether registry health check is enabled Is default enabled", "sourceType": "org.apache.camel.main.HealthConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean" }, - { "name": "camel.health.routesEnabled", "description": "Whether routes health check is enabled Is default enabled", "sourceType": "org.apache.camel.main.HealthConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean" }, + { "name": "camel.health.contextEnabled", "description": "Whether context health check is enabled", "sourceType": "org.apache.camel.main.HealthConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean", "defaultValue": true }, + { "name": "camel.health.enabled", "description": "Whether health check is enabled globally", "sourceType": "org.apache.camel.main.HealthConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean", "defaultValue": true }, + { "name": "camel.health.registryEnabled", "description": "Whether registry health check is enabled", "sourceType": "org.apache.camel.main.HealthConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean", "defaultValue": true }, + { "name": "camel.health.routesEnabled", "description": "Whether routes health check is enabled", "sourceType": "org.apache.camel.main.HealthConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean", "defaultValue": true }, { "name": "camel.hystrix.allowMaximumSizeToDivergeFromCoreSize", "description": "Allows the configuration for maximumSize to take effect. That value can then be equal to, or higher, than coreSize", "sourceType": "org.apache.camel.main.HystrixConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": true }, { "name": "camel.hystrix.circuitBreakerEnabled", "description": "Whether to use a HystrixCircuitBreaker or not. If false no circuit-breaker logic will be used and all requests permitted. This is similar in effect to circuitBreakerForceClosed() except that continues tracking metrics and knowing whether it should be open\/closed, this property results in not even instantiating a circuit-breaker.", "sourceType": "org.apache.camel.main.HystrixConfigurationProperties", "type": "boolean", [...] { "name": "camel.hystrix.circuitBreakerErrorThresholdPercentage", "description": "Error percentage threshold (as whole number such as 50) at which point the circuit breaker will trip open and reject requests. It will stay tripped for the duration defined in circuitBreakerSleepWindowInMilliseconds; The error percentage this is compared against comes from HystrixCommandMetrics.getHealthCounts().", "sourceType": "org.apache.camel.main.HystrixConfigurationProperties", "type": "integer", [...] @@ -146,23 +146,23 @@ { "name": "camel.lra.localParticipantContextPath", "description": "The context-path for the local participant. Is default \/lra-participant", "sourceType": "org.apache.camel.main.LraConfigurationProperties", "type": "string", "javaType": "java.lang.String", "defaultValue": "\/lra-participant" }, { "name": "camel.lra.localParticipantUrl", "description": "The URL for the local participant", "sourceType": "org.apache.camel.main.LraConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.resilience4j.automaticTransitionFromOpenToHalfOpenEnabled", "description": "Enables automatic transition from OPEN to HALF_OPEN state once the waitDurationInOpenState has passed.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean" }, - { "name": "camel.resilience4j.bulkheadEnabled", "description": "Whether bulkhead is enabled or not on the circuit breaker.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean" }, + { "name": "camel.resilience4j.bulkheadEnabled", "description": "Whether bulkhead is enabled or not on the circuit breaker.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean", "defaultValue": false }, { "name": "camel.resilience4j.bulkheadMaxConcurrentCalls", "description": "Configures the max amount of concurrent calls the bulkhead will support.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer" }, { "name": "camel.resilience4j.bulkheadMaxWaitDuration", "description": "Configures a maximum amount of time which the calling thread will wait to enter the bulkhead. If bulkhead has space available, entry is guaranteed and immediate. If bulkhead is full, calling threads will contest for space, if it becomes available. maxWaitDuration can be set to 0. Note: for threads running on an event-loop or equivalent (rx computation pool, etc), setting maxWaitDuration to 0 is highly recommended [...] { "name": "camel.resilience4j.circuitBreakerRef", "description": "Refers to an existing io.github.resilience4j.circuitbreaker.CircuitBreaker instance to lookup and use from the registry. When using this, then any other circuit breaker options are not in use.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.resilience4j.configRef", "description": "Refers to an existing io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup and use from the registry.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, - { "name": "camel.resilience4j.failureRateThreshold", "description": "Configures the failure rate threshold in percentage. If the failure rate is equal or greater than the threshold the CircuitBreaker transitions to open and starts short-circuiting calls. The threshold must be greater than 0 and not greater than 100. Default value is 50 percentage.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "number", "javaType": "java.lang.Float" }, - { "name": "camel.resilience4j.minimumNumberOfCalls", "description": "Configures configures the minimum number of calls which are required (per sliding window period) before the CircuitBreaker can calculate the error rate. For example, if minimumNumberOfCalls is 10, then at least 10 calls must be recorded, before the failure rate can be calculated. If only 9 calls have been recorded the CircuitBreaker will not transition to open even if all 9 calls have failed. Default minimumNumberOf [...] - { "name": "camel.resilience4j.permittedNumberOfCallsInHalfOpenState", "description": "Configures the number of permitted calls when the CircuitBreaker is half open. The size must be greater than 0. Default size is 10.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer" }, - { "name": "camel.resilience4j.slidingWindowSize", "description": "Configures the size of the sliding window which is used to record the outcome of calls when the CircuitBreaker is closed. slidingWindowSize configures the size of the sliding window. Sliding window can either be count-based or time-based. If slidingWindowType is COUNT_BASED, the last slidingWindowSize calls are recorded and aggregated. If slidingWindowType is TIME_BASED, the calls of the last slidingWindowSize seconds [...] - { "name": "camel.resilience4j.slidingWindowType", "description": "Configures the type of the sliding window which is used to record the outcome of calls when the CircuitBreaker is closed. Sliding window can either be count-based or time-based. If slidingWindowType is COUNT_BASED, the last slidingWindowSize calls are recorded and aggregated. If slidingWindowType is TIME_BASED, the calls of the last slidingWindowSize seconds are recorded and aggregated. Default slidingWindowType is COU [...] - { "name": "camel.resilience4j.slowCallDurationThreshold", "description": "Configures the duration threshold (seconds) above which calls are considered as slow and increase the slow calls percentage. Default value is 60 seconds.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer" }, - { "name": "camel.resilience4j.slowCallRateThreshold", "description": "Configures a threshold in percentage. The CircuitBreaker considers a call as slow when the call duration is greater than slowCallDurationThreshold(Duration. When the percentage of slow calls is equal or greater the threshold, the CircuitBreaker transitions to open and starts short-circuiting calls. The threshold must be greater than 0 and not greater than 100. Default value is 100 percentage which means that all re [...] - { "name": "camel.resilience4j.timeoutCancelRunningFuture", "description": "Configures whether cancel is called on the running future. Defaults to true.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean" }, - { "name": "camel.resilience4j.timeoutDuration", "description": "Configures the thread execution timeout (millis). Default value is 1000 millis (1 second).", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer" }, - { "name": "camel.resilience4j.timeoutEnabled", "description": "Whether timeout is enabled or not on the circuit breaker. Default is false.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean" }, + { "name": "camel.resilience4j.failureRateThreshold", "description": "Configures the failure rate threshold in percentage. If the failure rate is equal or greater than the threshold the CircuitBreaker transitions to open and starts short-circuiting calls. The threshold must be greater than 0 and not greater than 100. Default value is 50 percentage.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "number", "javaType": "java.lang.Float", "defaultValu [...] + { "name": "camel.resilience4j.minimumNumberOfCalls", "description": "Configures configures the minimum number of calls which are required (per sliding window period) before the CircuitBreaker can calculate the error rate. For example, if minimumNumberOfCalls is 10, then at least 10 calls must be recorded, before the failure rate can be calculated. If only 9 calls have been recorded the CircuitBreaker will not transition to open even if all 9 calls have failed. Default minimumNumberOf [...] + { "name": "camel.resilience4j.permittedNumberOfCallsInHalfOpenState", "description": "Configures the number of permitted calls when the CircuitBreaker is half open. The size must be greater than 0. Default size is 10.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer", "defaultValue": 10 }, + { "name": "camel.resilience4j.slidingWindowSize", "description": "Configures the size of the sliding window which is used to record the outcome of calls when the CircuitBreaker is closed. slidingWindowSize configures the size of the sliding window. Sliding window can either be count-based or time-based. If slidingWindowType is COUNT_BASED, the last slidingWindowSize calls are recorded and aggregated. If slidingWindowType is TIME_BASED, the calls of the last slidingWindowSize seconds [...] + { "name": "camel.resilience4j.slidingWindowType", "description": "Configures the type of the sliding window which is used to record the outcome of calls when the CircuitBreaker is closed. Sliding window can either be count-based or time-based. If slidingWindowType is COUNT_BASED, the last slidingWindowSize calls are recorded and aggregated. If slidingWindowType is TIME_BASED, the calls of the last slidingWindowSize seconds are recorded and aggregated. Default slidingWindowType is COU [...] + { "name": "camel.resilience4j.slowCallDurationThreshold", "description": "Configures the duration threshold (seconds) above which calls are considered as slow and increase the slow calls percentage. Default value is 60 seconds.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer", "defaultValue": 60 }, + { "name": "camel.resilience4j.slowCallRateThreshold", "description": "Configures a threshold in percentage. The CircuitBreaker considers a call as slow when the call duration is greater than slowCallDurationThreshold(Duration. When the percentage of slow calls is equal or greater the threshold, the CircuitBreaker transitions to open and starts short-circuiting calls. The threshold must be greater than 0 and not greater than 100. Default value is 100 percentage which means that all re [...] + { "name": "camel.resilience4j.timeoutCancelRunningFuture", "description": "Configures whether cancel is called on the running future. Defaults to true.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean", "defaultValue": true }, + { "name": "camel.resilience4j.timeoutDuration", "description": "Configures the thread execution timeout (millis). Default value is 1000 millis (1 second).", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer", "defaultValue": 1000 }, + { "name": "camel.resilience4j.timeoutEnabled", "description": "Whether timeout is enabled or not on the circuit breaker. Default is false.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean", "defaultValue": false }, { "name": "camel.resilience4j.timeoutExecutorServiceRef", "description": "References to a custom thread pool to use when timeout is enabled (uses ForkJoinPool#commonPool() by default)", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, - { "name": "camel.resilience4j.waitDurationInOpenState", "description": "Configures the wait duration (in seconds) which specifies how long the CircuitBreaker should stay open, before it switches to half open. Default value is 60 seconds.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer" }, + { "name": "camel.resilience4j.waitDurationInOpenState", "description": "Configures the wait duration (in seconds) which specifies how long the CircuitBreaker should stay open, before it switches to half open. Default value is 60 seconds.", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer", "defaultValue": 60 }, { "name": "camel.resilience4j.writableStackTraceEnabled", "description": "Enables writable stack traces. When set to false, Exception.getStackTrace returns a zero length array. This may be used to reduce log spam when the circuit breaker is open as the cause of the exceptions is already known (the circuit breaker is short-circuiting calls).", "sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean" }, { "name": "camel.rest.apiComponent", "description": "Sets the name of the Camel component to use as the REST API (such as swagger)", "sourceType": "org.apache.camel.spi.RestConfiguration", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.rest.apiContextIdPattern", "description": "Optional CamelContext id pattern to only allow Rest APIs from rest services within CamelContext's which name matches the pattern. The pattern #name# refers to the CamelContext name, to match on the current CamelContext only. For any other value, the pattern uses the rules from org.apache.camel.support.EndpointHelper#matchPattern(String,String)", "sourceType": "org.apache.camel.spi.RestConfiguration", "type": "string", "javaT [...] diff --git a/core/camel-main/src/main/docs/main.adoc b/core/camel-main/src/main/docs/main.adoc index 726debd..fcb5b86 100644 --- a/core/camel-main/src/main/docs/main.adoc +++ b/core/camel-main/src/main/docs/main.adoc @@ -53,7 +53,7 @@ The following table lists all the options: | *camel.main.javaRoutesInclude Pattern* | 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 specif [...] | *camel.main.jmxEnabled* | Enable JMX in your Camel application. | true | boolean | *camel.main.jmxManagementName Pattern* | The naming pattern for creating the CamelContext JMX management name. The default pattern is #name# | #name# | String -| *camel.main.jmxManagement StatisticsLevel* | Sets the JMX statistics level The level can be set to Extended to gather additional information The default value is Default. | ManagementStatisticsLevel.Default | ManagementStatisticsLevel +| *camel.main.jmxManagement StatisticsLevel* | Sets the JMX statistics level The level can be set to Extended to gather additional information The default value is Default. | Default | ManagementStatisticsLevel | *camel.main.lightweight* | Experimental: 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. | | boolean | *camel.main.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. | | boolean | *camel.main.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. | | int @@ -72,7 +72,7 @@ The following table lists all the options: | *camel.main.routeController ExcludeRoutes* | 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. | | String | *camel.main.routeController IncludeRoutes* | 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. | | String | *camel.main.routeController InitialDelay* | Initial delay in milli seconds before the route controller starts, after CamelContext has been started. | | long -| *camel.main.routeController RouteStartupLoggingLevel* | Sets the logging level used for logging route startup activity. By default INFO level is used. You can use this to change the level for example to OFF if this kind of logging is not wanted. | | LoggingLevel +| *camel.main.routeController RouteStartupLoggingLevel* | Sets the logging level used for logging route startup activity. By default INFO level is used. You can use this to change the level for example to OFF if this kind of logging is not wanted. | INFO | LoggingLevel | *camel.main.routeController SuperviseEnabled* | 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 allow [...] | *camel.main.routeController ThreadPoolSize* | 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. | | int | *camel.main.routeController 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. Setting this to true allows health checks to know about this and can report the Camel application as DOWN. The default is false. | | boolean @@ -104,24 +104,24 @@ The following table lists all the options: | *camel.main.useMdcLogging* | To turn on MDC logging | | boolean | *camel.main.xmlRests* | Directory to scan for adding additional XML rests. You can turn this off by setting the value to false. Files can be loaded from either classpath or file by prefixing with classpath: or file: Wildcards is supported using a ANT pattern style paths, such as classpath:**/*camel*.xml Notice when using wildcards, then there is additional overhead as the classpath is scanned, where as if you specific the exact name for each XML file is faster as no cla [...] | *camel.main.xmlRoutes* | Directory to scan for adding additional XML routes. You can turn this off by setting the value to false. Files can be loaded from either classpath or file by prefixing with classpath: or file: Wildcards is supported using a ANT pattern style paths, such as classpath:**/*camel*.xml Notice when using wildcards, then there is additional overhead as the classpath is scanned, where as if you specific the exact name for each XML file is faster as no c [...] -| *camel.faulttolerance.bulkhead Enabled* | Whether bulkhead is enabled or not on the circuit breaker. Default is false. | | Boolean +| *camel.faulttolerance.bulkhead Enabled* | Whether bulkhead is enabled or not on the circuit breaker. Default is false. | false | Boolean | *camel.faulttolerance.bulkhead ExecutorServiceRef* | References to a custom thread pool to use when bulkhead is enabled. | | String -| *camel.faulttolerance.bulkhead MaxConcurrentCalls* | Configures the max amount of concurrent calls the bulkhead will support. Default value is 10. | | Integer -| *camel.faulttolerance.bulkhead WaitingTaskQueue* | Configures the task queue size for holding waiting tasks to be processed by the bulkhead. Default value is 10. | | Integer +| *camel.faulttolerance.bulkhead MaxConcurrentCalls* | Configures the max amount of concurrent calls the bulkhead will support. Default value is 10. | 10 | Integer +| *camel.faulttolerance.bulkhead WaitingTaskQueue* | Configures the task queue size for holding waiting tasks to be processed by the bulkhead. Default value is 10. | 10 | Integer | *camel.faulttolerance.circuit BreakerRef* | Refers to an existing io.smallrye.faulttolerance.core.circuit.breaker.CircuitBreaker instance to lookup and use from the registry. When using this, then any other circuit breaker options are not in use. | | String -| *camel.faulttolerance.delay* | Control how long the circuit breaker stays open. The value are in seconds and the default is 5 seconds. | | Long -| *camel.faulttolerance.failure Ratio* | Configures the failure rate threshold in percentage. If the failure rate is equal or greater than the threshold the CircuitBreaker transitions to open and starts short-circuiting calls. The threshold must be greater than 0 and not greater than 100. Default value is 50 percentage. | | Integer -| *camel.faulttolerance.request VolumeThreshold* | Controls the size of the rolling window used when the circuit breaker is closed Default value is 20. | | Integer -| *camel.faulttolerance.success Threshold* | Controls the number of trial calls which are allowed when the circuit breaker is half-open Default value is 1. | | Integer -| *camel.faulttolerance.timeout Duration* | Configures the thread execution timeout. Default value is 1000 milliseconds. | | Long -| *camel.faulttolerance.timeout Enabled* | Whether timeout is enabled or not on the circuit breaker. Default is false. | | Boolean -| *camel.faulttolerance.timeout PoolSize* | Configures the pool size of the thread pool when timeout is enabled. Default value is 10. | | Integer +| *camel.faulttolerance.delay* | Control how long the circuit breaker stays open. The value are in seconds and the default is 5 seconds. | 5 | Long +| *camel.faulttolerance.failure Ratio* | Configures the failure rate threshold in percentage. If the failure rate is equal or greater than the threshold the CircuitBreaker transitions to open and starts short-circuiting calls. The threshold must be greater than 0 and not greater than 100. Default value is 50 percentage. | 50 | Integer +| *camel.faulttolerance.request VolumeThreshold* | Controls the size of the rolling window used when the circuit breaker is closed Default value is 20. | 20 | Integer +| *camel.faulttolerance.success Threshold* | Controls the number of trial calls which are allowed when the circuit breaker is half-open Default value is 1. | 1 | Integer +| *camel.faulttolerance.timeout Duration* | Configures the thread execution timeout. Default value is 1000 milliseconds. | 1000 | Long +| *camel.faulttolerance.timeout Enabled* | Whether timeout is enabled or not on the circuit breaker. Default is false. | false | Boolean +| *camel.faulttolerance.timeout PoolSize* | Configures the pool size of the thread pool when timeout is enabled. Default value is 10. | 10 | Integer | *camel.faulttolerance.timeout ScheduledExecutorServiceRef* | References to a custom thread pool to use when timeout is enabled | | String | *camel.health.config* | Set additional HealthConfigurationProperties for fine grained configuration of health checks. | | Map -| *camel.health.contextEnabled* | Whether context health check is enabled Is default enabled | | Boolean -| *camel.health.enabled* | Whether health check is enabled globally | | Boolean -| *camel.health.registryEnabled* | Whether registry health check is enabled Is default enabled | | Boolean -| *camel.health.routesEnabled* | Whether routes health check is enabled Is default enabled | | Boolean +| *camel.health.contextEnabled* | Whether context health check is enabled | true | Boolean +| *camel.health.enabled* | Whether health check is enabled globally | true | Boolean +| *camel.health.registryEnabled* | Whether registry health check is enabled | true | Boolean +| *camel.health.routesEnabled* | Whether routes health check is enabled | true | Boolean | *camel.hystrix.allowMaximumSize ToDivergeFromCoreSize* | Allows the configuration for maximumSize to take effect. That value can then be equal to, or higher, than coreSize | | Boolean | *camel.hystrix.circuitBreaker Enabled* | Whether to use a HystrixCircuitBreaker or not. If false no circuit-breaker logic will be used and all requests permitted. This is similar in effect to circuitBreakerForceClosed() except that continues tracking metrics and knowing whether it should be open/closed, this property results in not even instantiating a circuit-breaker. | | Boolean | *camel.hystrix.circuitBreaker ErrorThresholdPercentage* | Error percentage threshold (as whole number such as 50) at which point the circuit breaker will trip open and reject requests. It will stay tripped for the duration defined in circuitBreakerSleepWindowInMilliseconds; The error percentage this is compared against comes from HystrixCommandMetrics.getHealthCounts(). | | Integer @@ -158,23 +158,23 @@ The following table lists all the options: | *camel.lra.localParticipant ContextPath* | The context-path for the local participant. Is default /lra-participant | /lra-participant | String | *camel.lra.localParticipantUrl* | The URL for the local participant | | String | *camel.resilience4j.automatic TransitionFromOpenToHalfOpen Enabled* | Enables automatic transition from OPEN to HALF_OPEN state once the waitDurationInOpenState has passed. | | Boolean -| *camel.resilience4j.bulkhead Enabled* | Whether bulkhead is enabled or not on the circuit breaker. | | Boolean +| *camel.resilience4j.bulkhead Enabled* | Whether bulkhead is enabled or not on the circuit breaker. | false | Boolean | *camel.resilience4j.bulkheadMax ConcurrentCalls* | Configures the max amount of concurrent calls the bulkhead will support. | | Integer | *camel.resilience4j.bulkheadMax WaitDuration* | Configures a maximum amount of time which the calling thread will wait to enter the bulkhead. If bulkhead has space available, entry is guaranteed and immediate. If bulkhead is full, calling threads will contest for space, if it becomes available. maxWaitDuration can be set to 0. Note: for threads running on an event-loop or equivalent (rx computation pool, etc), setting maxWaitDuration to 0 is highly recommended. Blocking an event-loop t [...] | *camel.resilience4j.circuit BreakerRef* | Refers to an existing io.github.resilience4j.circuitbreaker.CircuitBreaker instance to lookup and use from the registry. When using this, then any other circuit breaker options are not in use. | | String | *camel.resilience4j.configRef* | Refers to an existing io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup and use from the registry. | | String -| *camel.resilience4j.failureRate Threshold* | Configures the failure rate threshold in percentage. If the failure rate is equal or greater than the threshold the CircuitBreaker transitions to open and starts short-circuiting calls. The threshold must be greater than 0 and not greater than 100. Default value is 50 percentage. | | Float -| *camel.resilience4j.minimum NumberOfCalls* | Configures configures the minimum number of calls which are required (per sliding window period) before the CircuitBreaker can calculate the error rate. For example, if minimumNumberOfCalls is 10, then at least 10 calls must be recorded, before the failure rate can be calculated. If only 9 calls have been recorded the CircuitBreaker will not transition to open even if all 9 calls have failed. Default minimumNumberOfCalls is 100 | | Integer -| *camel.resilience4j.permitted NumberOfCallsInHalfOpenState* | Configures the number of permitted calls when the CircuitBreaker is half open. The size must be greater than 0. Default size is 10. | | Integer -| *camel.resilience4j.sliding WindowSize* | Configures the size of the sliding window which is used to record the outcome of calls when the CircuitBreaker is closed. slidingWindowSize configures the size of the sliding window. Sliding window can either be count-based or time-based. If slidingWindowType is COUNT_BASED, the last slidingWindowSize calls are recorded and aggregated. If slidingWindowType is TIME_BASED, the calls of the last slidingWindowSize seconds are recorded and aggregate [...] -| *camel.resilience4j.sliding WindowType* | Configures the type of the sliding window which is used to record the outcome of calls when the CircuitBreaker is closed. Sliding window can either be count-based or time-based. If slidingWindowType is COUNT_BASED, the last slidingWindowSize calls are recorded and aggregated. If slidingWindowType is TIME_BASED, the calls of the last slidingWindowSize seconds are recorded and aggregated. Default slidingWindowType is COUNT_BASED. | | String -| *camel.resilience4j.slowCall DurationThreshold* | Configures the duration threshold (seconds) above which calls are considered as slow and increase the slow calls percentage. Default value is 60 seconds. | | Integer -| *camel.resilience4j.slowCall RateThreshold* | Configures a threshold in percentage. The CircuitBreaker considers a call as slow when the call duration is greater than slowCallDurationThreshold(Duration. When the percentage of slow calls is equal or greater the threshold, the CircuitBreaker transitions to open and starts short-circuiting calls. The threshold must be greater than 0 and not greater than 100. Default value is 100 percentage which means that all recorded calls must be slowe [...] -| *camel.resilience4j.timeout CancelRunningFuture* | Configures whether cancel is called on the running future. Defaults to true. | | Boolean -| *camel.resilience4j.timeout Duration* | Configures the thread execution timeout (millis). Default value is 1000 millis (1 second). | | Integer -| *camel.resilience4j.timeout Enabled* | Whether timeout is enabled or not on the circuit breaker. Default is false. | | Boolean +| *camel.resilience4j.failureRate Threshold* | Configures the failure rate threshold in percentage. If the failure rate is equal or greater than the threshold the CircuitBreaker transitions to open and starts short-circuiting calls. The threshold must be greater than 0 and not greater than 100. Default value is 50 percentage. | 50 | Float +| *camel.resilience4j.minimum NumberOfCalls* | Configures configures the minimum number of calls which are required (per sliding window period) before the CircuitBreaker can calculate the error rate. For example, if minimumNumberOfCalls is 10, then at least 10 calls must be recorded, before the failure rate can be calculated. If only 9 calls have been recorded the CircuitBreaker will not transition to open even if all 9 calls have failed. Default minimumNumberOfCalls is 100 | 100 | Integer +| *camel.resilience4j.permitted NumberOfCallsInHalfOpenState* | Configures the number of permitted calls when the CircuitBreaker is half open. The size must be greater than 0. Default size is 10. | 10 | Integer +| *camel.resilience4j.sliding WindowSize* | Configures the size of the sliding window which is used to record the outcome of calls when the CircuitBreaker is closed. slidingWindowSize configures the size of the sliding window. Sliding window can either be count-based or time-based. If slidingWindowType is COUNT_BASED, the last slidingWindowSize calls are recorded and aggregated. If slidingWindowType is TIME_BASED, the calls of the last slidingWindowSize seconds are recorded and aggregate [...] +| *camel.resilience4j.sliding WindowType* | Configures the type of the sliding window which is used to record the outcome of calls when the CircuitBreaker is closed. Sliding window can either be count-based or time-based. If slidingWindowType is COUNT_BASED, the last slidingWindowSize calls are recorded and aggregated. If slidingWindowType is TIME_BASED, the calls of the last slidingWindowSize seconds are recorded and aggregated. Default slidingWindowType is COUNT_BASED. | COUNT_BASED | String +| *camel.resilience4j.slowCall DurationThreshold* | Configures the duration threshold (seconds) above which calls are considered as slow and increase the slow calls percentage. Default value is 60 seconds. | 60 | Integer +| *camel.resilience4j.slowCall RateThreshold* | Configures a threshold in percentage. The CircuitBreaker considers a call as slow when the call duration is greater than slowCallDurationThreshold(Duration. When the percentage of slow calls is equal or greater the threshold, the CircuitBreaker transitions to open and starts short-circuiting calls. The threshold must be greater than 0 and not greater than 100. Default value is 100 percentage which means that all recorded calls must be slowe [...] +| *camel.resilience4j.timeout CancelRunningFuture* | Configures whether cancel is called on the running future. Defaults to true. | true | Boolean +| *camel.resilience4j.timeout Duration* | Configures the thread execution timeout (millis). Default value is 1000 millis (1 second). | 1000 | Integer +| *camel.resilience4j.timeout Enabled* | Whether timeout is enabled or not on the circuit breaker. Default is false. | false | Boolean | *camel.resilience4j.timeout ExecutorServiceRef* | References to a custom thread pool to use when timeout is enabled (uses ForkJoinPool#commonPool() by default) | | String -| *camel.resilience4j.wait DurationInOpenState* | Configures the wait duration (in seconds) which specifies how long the CircuitBreaker should stay open, before it switches to half open. Default value is 60 seconds. | | Integer +| *camel.resilience4j.wait DurationInOpenState* | Configures the wait duration (in seconds) which specifies how long the CircuitBreaker should stay open, before it switches to half open. Default value is 60 seconds. | 60 | Integer | *camel.resilience4j.writable StackTraceEnabled* | Enables writable stack traces. When set to false, Exception.getStackTrace returns a zero length array. This may be used to reduce log spam when the circuit breaker is open as the cause of the exceptions is already known (the circuit breaker is short-circuiting calls). | | Boolean | *camel.rest.apiComponent* | Sets the name of the Camel component to use as the REST API (such as swagger) | | String | *camel.rest.apiContextIdPattern* | Optional CamelContext id pattern to only allow Rest APIs from rest services within CamelContext's which name matches the pattern. The pattern #name# refers to the CamelContext name, to match on the current CamelContext only. For any other value, the pattern uses the rules from org.apache.camel.support.EndpointHelper#matchPattern(String,String) | | String diff --git a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java index 9239ef6..0b8e62c 100644 --- a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java +++ b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java @@ -19,6 +19,7 @@ package org.apache.camel.main; import org.apache.camel.Experimental; import org.apache.camel.LoggingLevel; import org.apache.camel.ManagementStatisticsLevel; +import org.apache.camel.spi.Metadata; import org.apache.camel.support.PatternHelper; /** @@ -67,6 +68,7 @@ public abstract class DefaultConfigurationProperties<T> { private boolean endpointBasicPropertyBinding; private boolean useDataType; private boolean useBreadcrumb; + @Metadata(defaultValue = "Default") private ManagementStatisticsLevel jmxManagementStatisticsLevel = ManagementStatisticsLevel.Default; private String jmxManagementNamePattern = "#name#"; private boolean useMdcLogging; @@ -83,7 +85,8 @@ public abstract class DefaultConfigurationProperties<T> { private String xmlRests = "classpath:camel-rest/*.xml"; private boolean lightweight; // route controller - private LoggingLevel routeControllerRouteStartupLoggingLevel; + @Metadata(defaultValue = "INFO") + private LoggingLevel routeControllerRouteStartupLoggingLevel = LoggingLevel.INFO; private boolean routeControllerSuperviseEnabled; private String routeControllerIncludeRoutes; private String routeControllerExcludeRoutes; diff --git a/core/camel-main/src/main/java/org/apache/camel/main/FaultToleranceConfigurationProperties.java b/core/camel-main/src/main/java/org/apache/camel/main/FaultToleranceConfigurationProperties.java index 03dd29f..26477d9 100644 --- a/core/camel-main/src/main/java/org/apache/camel/main/FaultToleranceConfigurationProperties.java +++ b/core/camel-main/src/main/java/org/apache/camel/main/FaultToleranceConfigurationProperties.java @@ -17,6 +17,7 @@ package org.apache.camel.main; import org.apache.camel.spi.Configurer; +import org.apache.camel.spi.Metadata; /** * Global configuration for MicroProfile Fault Tolerance EIP circuit breaker. @@ -27,16 +28,26 @@ public class FaultToleranceConfigurationProperties { private final MainConfigurationProperties parent; private String circuitBreakerRef; + @Metadata(defaultValue = "5") private Long delay; + @Metadata(defaultValue = "1") private Integer successThreshold; + @Metadata(defaultValue = "20") private Integer requestVolumeThreshold; + @Metadata(defaultValue = "50") private Integer failureRatio; + @Metadata(defaultValue = "false") private Boolean timeoutEnabled; + @Metadata(defaultValue = "1000") private Long timeoutDuration; + @Metadata(defaultValue = "10") private Integer timeoutPoolSize; private String timeoutScheduledExecutorServiceRef; + @Metadata(defaultValue = "false") private Boolean bulkheadEnabled; + @Metadata(defaultValue = "10") private Integer bulkheadMaxConcurrentCalls; + @Metadata(defaultValue = "10") private Integer bulkheadWaitingTaskQueue; private String bulkheadExecutorServiceRef; diff --git a/core/camel-main/src/main/java/org/apache/camel/main/HealthConfigurationProperties.java b/core/camel-main/src/main/java/org/apache/camel/main/HealthConfigurationProperties.java index 5cba654..ba5ae43 100644 --- a/core/camel-main/src/main/java/org/apache/camel/main/HealthConfigurationProperties.java +++ b/core/camel-main/src/main/java/org/apache/camel/main/HealthConfigurationProperties.java @@ -20,6 +20,7 @@ import java.util.HashMap; import java.util.Map; import org.apache.camel.spi.Configurer; +import org.apache.camel.spi.Metadata; /** * Global configuration for Health Check @@ -29,9 +30,13 @@ public class HealthConfigurationProperties { private final MainConfigurationProperties parent; + @Metadata(defaultValue = "true") private Boolean enabled; + @Metadata(defaultValue = "true") private Boolean contextEnabled; + @Metadata(defaultValue = "true") private Boolean routesEnabled; + @Metadata(defaultValue = "true") private Boolean registryEnabled; private Map<String, HealthCheckConfigurationProperties> config = new HashMap<>(); @@ -60,8 +65,6 @@ public class HealthConfigurationProperties { /** * Whether context health check is enabled - * - * Is default enabled */ public void setContextEnabled(Boolean contextEnabled) { this.contextEnabled = contextEnabled; @@ -73,8 +76,6 @@ public class HealthConfigurationProperties { /** * Whether routes health check is enabled - * - * Is default enabled */ public void setRoutesEnabled(Boolean routesEnabled) { this.routesEnabled = routesEnabled; @@ -86,8 +87,6 @@ public class HealthConfigurationProperties { /** * Whether registry health check is enabled - * - * Is default enabled */ public void setRegistryEnabled(Boolean registryEnabled) { this.registryEnabled = registryEnabled; @@ -114,8 +113,6 @@ public class HealthConfigurationProperties { /** * Whether context health check is enabled - * - * Is default enabled */ public HealthConfigurationProperties withContextEnabled(boolean contextEnabled) { this.contextEnabled = contextEnabled; @@ -124,8 +121,6 @@ public class HealthConfigurationProperties { /** * Whether routes health check is enabled - * - * Is default enabled */ public HealthConfigurationProperties withRoutesEnabled(boolean routesEnabled) { this.routesEnabled = routesEnabled; @@ -134,8 +129,6 @@ public class HealthConfigurationProperties { /** * Whether registry health check is enabled - * - * Is default enabled */ public HealthConfigurationProperties withRegistryEnabled(boolean registryEnabled) { this.registryEnabled = registryEnabled; diff --git a/core/camel-main/src/main/java/org/apache/camel/main/LraConfigurationProperties.java b/core/camel-main/src/main/java/org/apache/camel/main/LraConfigurationProperties.java index c9963db..72d22cd 100644 --- a/core/camel-main/src/main/java/org/apache/camel/main/LraConfigurationProperties.java +++ b/core/camel-main/src/main/java/org/apache/camel/main/LraConfigurationProperties.java @@ -17,6 +17,7 @@ package org.apache.camel.main; import org.apache.camel.spi.Configurer; +import org.apache.camel.spi.Metadata; /** * Global configuration for Saga LRA @@ -27,8 +28,10 @@ public class LraConfigurationProperties { private final MainConfigurationProperties parent; private String coordinatorUrl; + @Metadata(defaultValue = "/lra-coordinator") private String coordinatorContextPath = "/lra-coordinator"; private String localParticipantUrl; + @Metadata(defaultValue = "/lra-participant") private String localParticipantContextPath = "/lra-participant"; public LraConfigurationProperties(MainConfigurationProperties parent) { @@ -97,8 +100,6 @@ public class LraConfigurationProperties { /** * The context-path for the LRA coordinator. - * - * Is default /lra-coordinator */ public LraConfigurationProperties withCoordinatorContextPath(String coordinatorContextPath) { this.coordinatorContextPath = coordinatorContextPath; @@ -115,8 +116,6 @@ public class LraConfigurationProperties { /** * The context-path for the local participant. - * - * Is default /lra-participant */ public LraConfigurationProperties withLocalParticipantContextPath(String localParticipantContextPath) { this.localParticipantContextPath = localParticipantContextPath; diff --git a/core/camel-main/src/main/java/org/apache/camel/main/Resilience4jConfigurationProperties.java b/core/camel-main/src/main/java/org/apache/camel/main/Resilience4jConfigurationProperties.java index cf5bc5d..a98a7d1 100644 --- a/core/camel-main/src/main/java/org/apache/camel/main/Resilience4jConfigurationProperties.java +++ b/core/camel-main/src/main/java/org/apache/camel/main/Resilience4jConfigurationProperties.java @@ -19,6 +19,7 @@ package org.apache.camel.main; import java.util.concurrent.ForkJoinPool; import org.apache.camel.spi.Configurer; +import org.apache.camel.spi.Metadata; /** * Global configuration for Resilience EIP circuit breaker. @@ -30,22 +31,34 @@ public class Resilience4jConfigurationProperties { private String circuitBreakerRef; private String configRef; + @Metadata(defaultValue = "50") private Float failureRateThreshold; + @Metadata(defaultValue = "10") private Integer permittedNumberOfCallsInHalfOpenState; + @Metadata(defaultValue = "100") private Integer slidingWindowSize; + @Metadata(defaultValue = "COUNT_BASED", enums = "COUNT_BASED,TIME_BASED") private String slidingWindowType; + @Metadata(defaultValue = "100") private Integer minimumNumberOfCalls; private Boolean writableStackTraceEnabled; + @Metadata(defaultValue = "60") private Integer waitDurationInOpenState; private Boolean automaticTransitionFromOpenToHalfOpenEnabled; + @Metadata(defaultValue = "100") private Float slowCallRateThreshold; + @Metadata(defaultValue = "60") private Integer slowCallDurationThreshold; + @Metadata(defaultValue = "false") private Boolean bulkheadEnabled; private Integer bulkheadMaxConcurrentCalls; private Integer bulkheadMaxWaitDuration; + @Metadata(defaultValue = "false") private Boolean timeoutEnabled; private String timeoutExecutorServiceRef; + @Metadata(defaultValue = "1000") private Integer timeoutDuration; + @Metadata(defaultValue = "true") private Boolean timeoutCancelRunningFuture; public Resilience4jConfigurationProperties(MainConfigurationProperties parent) { diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCamelMainMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCamelMainMojo.java index b7e3669..fb46a98 100644 --- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCamelMainMojo.java +++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCamelMainMojo.java @@ -23,6 +23,7 @@ import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; +import org.apache.camel.spi.Metadata; import org.apache.camel.tooling.model.JsonMapper; import org.apache.camel.tooling.model.MainModel; import org.apache.camel.tooling.model.MainModel.MainGroupModel; @@ -37,6 +38,7 @@ import org.apache.maven.plugins.annotations.ResolutionScope; import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProjectHelper; import org.jboss.forge.roaster.Roaster; +import org.jboss.forge.roaster.model.source.AnnotationSource; import org.jboss.forge.roaster.model.source.FieldSource; import org.jboss.forge.roaster.model.source.JavaClassSource; import org.jboss.forge.roaster.model.source.MethodSource; @@ -73,12 +75,16 @@ public class PrepareCamelMainMojo extends AbstractGeneratorMojo { // filter out final or static fields fields = fields.stream().filter(f -> !f.isFinal() && !f.isStatic()).collect(Collectors.toList()); fields.forEach(f -> { + AnnotationSource as = f.getAnnotation(Metadata.class); String name = f.getName(); String javaType = f.getType().getQualifiedName(); String sourceType = clazz.getQualifiedName(); String defaultValue = f.getStringInitializer(); - // skip constructors + if (as != null) { + defaultValue = as.getStringValue("defaultValue"); + } if (defaultValue != null && defaultValue.startsWith("new ")) { + // skip constructors defaultValue = null; } @@ -110,6 +116,12 @@ public class PrepareCamelMainMojo extends AbstractGeneratorMojo { } else if ("org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy".equals(javaType)) { enums = Arrays.asList("Abort,CallerRuns,DiscardOldest,Discard".split(",")); } + if (enums == null && as != null) { + String text = as.getStringValue("enums"); + if (text != null) { + enums = Arrays.asList(text.split(",")); + } + } model.setEnums(enums); answer.add(model); }