You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2026/06/23 15:44:29 UTC
(camel) 02/12: CAMEL-23816: Improve descriptions in EIP model classes for catalog and MCP tools
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch fix/CAMEL-23816
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 8300dbc0cd993963d6e36c5209422ca63534b0c6
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Jun 23 14:48:08 2026 +0200
CAMEL-23816: Improve descriptions in EIP model classes for catalog and MCP tools
Co-Authored-By: Claude Opus 4.6 <no...@anthropic.com>
---
.../apache/camel/model/AggregateDefinition.java | 106 +++++++++++++++------
.../org/apache/camel/model/ChoiceDefinition.java | 5 +-
.../org/apache/camel/model/FilterDefinition.java | 4 +-
.../java/org/apache/camel/model/LogDefinition.java | 14 ++-
.../apache/camel/model/MulticastDefinition.java | 45 ++++++---
.../org/apache/camel/model/SplitDefinition.java | 51 +++++++---
6 files changed, 169 insertions(+), 56 deletions(-)
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/AggregateDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/AggregateDefinition.java
index 02b3fcc6d6d3..5ff6eee43259 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/AggregateDefinition.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/AggregateDefinition.java
@@ -73,86 +73,138 @@ public class AggregateDefinition extends OutputDefinition<AggregateDefinition>
private ExpressionSubElementDefinition correlationExpression;
@XmlElement(name = "completionPredicate")
@AsPredicate
- @Metadata(label = "advanced")
+ @Metadata(label = "advanced",
+ description = "A predicate to indicate when an aggregated exchange is complete."
+ + " If not specified and the AggregationStrategy implements Predicate, it will be used as the completionPredicate.")
private ExpressionSubElementDefinition completionPredicate;
@XmlElement(name = "completionTimeoutExpression")
- @Metadata(label = "advanced")
+ @Metadata(label = "advanced",
+ description = "Time in millis that an aggregated exchange should be inactive before its complete (timeout),"
+ + " evaluated as an expression allowing dynamic timeout values.")
private ExpressionSubElementDefinition completionTimeoutExpression;
@XmlElement(name = "completionSizeExpression")
- @Metadata(label = "advanced")
+ @Metadata(label = "advanced",
+ description = "Number of messages aggregated before the aggregation is complete,"
+ + " evaluated as an expression allowing dynamic size values.")
private ExpressionSubElementDefinition completionSizeExpression;
@XmlElement(name = "optimisticLockRetryPolicy")
- @Metadata(label = "advanced")
+ @Metadata(label = "advanced",
+ description = "Configures retry settings when using optimistic locking.")
private OptimisticLockRetryPolicyDefinition optimisticLockRetryPolicyDefinition;
@XmlAttribute
- @Metadata(javaType = "java.lang.Boolean")
+ @Metadata(javaType = "java.lang.Boolean",
+ description = "When completed exchanges are sent out of the aggregator, this option indicates whether"
+ + " Camel should use a thread pool with multiple threads for concurrency.")
private String parallelProcessing;
@XmlAttribute
- @Metadata(javaType = "java.lang.Boolean")
+ @Metadata(javaType = "java.lang.Boolean",
+ description = "Turns on optimistic locking, which requires the aggregation repository"
+ + " to implement OptimisticLockingAggregationRepository.")
private String optimisticLocking;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false")
+ @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false",
+ description = "When optimistic locking is enabled, retries happen synchronously in the same thread"
+ + " instead of being scheduled on a background thread."
+ + " This preserves transaction context for repositories that require single-thread transactional guarantees.")
private String optimisticLockingSyncRetry;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService")
+ @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService",
+ description = "Reference to a custom thread pool to use for parallel processing"
+ + " and sending out aggregated exchanges.")
private String executorService;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.util.concurrent.ScheduledExecutorService")
+ @Metadata(label = "advanced", javaType = "java.util.concurrent.ScheduledExecutorService",
+ description = "Reference to a custom thread pool for the background completion timeout checker.")
private String timeoutCheckerExecutorService;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "org.apache.camel.processor.aggregate.AggregateController")
+ @Metadata(label = "advanced", javaType = "org.apache.camel.processor.aggregate.AggregateController",
+ description = "Reference to an AggregateController to allow external sources to control this aggregator.")
private String aggregateController;
@XmlAttribute
- @Metadata(javaType = "org.apache.camel.spi.AggregationRepository")
+ @Metadata(javaType = "org.apache.camel.spi.AggregationRepository",
+ description = "Reference to the AggregationRepository to use."
+ + " By default uses MemoryAggregationRepository.")
private String aggregationRepository;
@XmlAttribute(required = true)
- @Metadata(javaType = "org.apache.camel.AggregationStrategy")
+ @Metadata(javaType = "org.apache.camel.AggregationStrategy",
+ description = "The AggregationStrategy to use. Required. Merges each incoming exchange with the existing"
+ + " already merged exchanges. At first call the oldExchange parameter is null.")
private String aggregationStrategy;
@XmlAttribute
- @Metadata(label = "advanced")
+ @Metadata(label = "advanced",
+ description = "The method name to use when using a POJO as the AggregationStrategy.")
private String aggregationStrategyMethodName;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.lang.Boolean")
+ @Metadata(label = "advanced", javaType = "java.lang.Boolean",
+ description = "If true then null is used as the oldExchange at the very first aggregation,"
+ + " when using POJOs as the AggregationStrategy.")
private String aggregationStrategyMethodAllowNull;
@XmlAttribute
- @Metadata(javaType = "java.lang.Integer")
+ @Metadata(javaType = "java.lang.Integer",
+ description = "Number of messages aggregated before the aggregation is complete."
+ + " Can also be set as an expression via completionSizeExpression.")
private String completionSize;
@XmlAttribute
- @Metadata(javaType = "java.time.Duration")
+ @Metadata(javaType = "java.time.Duration",
+ description = "A repeating period by which the aggregator will complete all current aggregated exchanges."
+ + " Cannot be used together with completionTimeout.")
private String completionInterval;
@XmlAttribute
- @Metadata(javaType = "java.time.Duration")
+ @Metadata(javaType = "java.time.Duration",
+ description = "Time that an aggregated exchange should be inactive before its complete (timeout)."
+ + " Cannot be used together with completionInterval.")
private String completionTimeout;
@XmlAttribute
- @Metadata(label = "advanced", defaultValue = "1000", javaType = "java.time.Duration")
+ @Metadata(label = "advanced", defaultValue = "1000", javaType = "java.time.Duration",
+ description = "Interval in millis for the background task that checks for completion timeouts."
+ + " Default is 1000 (1 second).")
private String completionTimeoutCheckerInterval;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.lang.Boolean")
+ @Metadata(label = "advanced", javaType = "java.lang.Boolean",
+ description = "Enables batch completion mode where aggregation completes based on the total number"
+ + " of exchanges reported by a batch consumer. Cannot be used together with discardOnAggregationFailure.")
private String completionFromBatchConsumer;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.lang.Boolean")
+ @Metadata(label = "advanced", javaType = "java.lang.Boolean",
+ description = "Enables completion on all previous groups when a new incoming correlation group starts."
+ + " Only one correlation group can be in progress at a time.")
private String completionOnNewCorrelationGroup;
@XmlAttribute
- @Metadata(javaType = "java.lang.Boolean")
+ @Metadata(javaType = "java.lang.Boolean",
+ description = "If enabled then the completion predicate evaluates against the incoming exchange."
+ + " Otherwise it evaluates against the aggregated exchange.")
private String eagerCheckCompletion;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.lang.Boolean")
+ @Metadata(label = "advanced", javaType = "java.lang.Boolean",
+ description = "If enabled then a correlation key that cannot be evaluated is logged and ignored,"
+ + " instead of throwing an exception.")
private String ignoreInvalidCorrelationKeys;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.lang.Integer")
+ @Metadata(label = "advanced", javaType = "java.lang.Integer",
+ description = "Closes a correlation key when its complete. Late arriving exchanges with a closed"
+ + " correlation key will throw a ClosedCorrelationKeyException."
+ + " The value is the maximum cache size of closed keys. Use 0 for unbounded.")
private String closeCorrelationKeyOnCompletion;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.lang.Boolean")
+ @Metadata(label = "advanced", javaType = "java.lang.Boolean",
+ description = "If enabled then the aggregated message is discarded (dropped) on completion timeout"
+ + " instead of being sent out of the aggregator.")
private String discardOnCompletionTimeout;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.lang.Boolean")
+ @Metadata(label = "advanced", javaType = "java.lang.Boolean",
+ description = "If enabled then the partly aggregated message is discarded when aggregation failed"
+ + " (an exception was thrown from AggregationStrategy)."
+ + " Cannot be used together with completionFromBatchConsumer.")
private String discardOnAggregationFailure;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.lang.Boolean")
+ @Metadata(label = "advanced", javaType = "java.lang.Boolean",
+ description = "If enabled then all current aggregated exchanges are completed when the context is stopped.")
private String forceCompletionOnStop;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.lang.Boolean")
+ @Metadata(label = "advanced", javaType = "java.lang.Boolean",
+ description = "If enabled then waits to complete all current and partial (pending) aggregated exchanges"
+ + " when the context is stopped, ensuring the aggregation repository is empty before shutdown.")
private String completeAllOnStop;
public AggregateDefinition() {
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/ChoiceDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/ChoiceDefinition.java
index 17208a737c79..ce4dc746b528 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/ChoiceDefinition.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/ChoiceDefinition.java
@@ -54,7 +54,10 @@ public class ChoiceDefinition extends NoOutputDefinition<ChoiceDefinition> {
@Metadata(description = "Sets the otherwise node")
private OtherwiseDefinition otherwise;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false")
+ @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false",
+ description = "If enabled then the choice is evaluated at route initialization time (precondition)."
+ + " Only when predicates with property placeholders or simple expressions using only"
+ + " property placeholders are supported.")
private String precondition;
public ChoiceDefinition() {
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/FilterDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/FilterDefinition.java
index 9ea471db5184..9e4ba76ca20e 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/FilterDefinition.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/FilterDefinition.java
@@ -36,7 +36,9 @@ import org.apache.camel.spi.Metadata;
public class FilterDefinition extends OutputExpressionNode {
@XmlAttribute
- @Metadata(label = "advanced")
+ @Metadata(label = "advanced",
+ description = "Name of an exchange property to store whether the filter predicate matched or not."
+ + " The value is stored as a boolean.")
private String statusPropertyName;
public FilterDefinition() {
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/LogDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/LogDefinition.java
index d57e7f90e60f..ce249dabda40 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/LogDefinition.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/LogDefinition.java
@@ -39,21 +39,27 @@ public class LogDefinition extends NoOutputDefinition<LogDefinition> {
@XmlAttribute(required = true)
@DslArg(position = 1)
+ @Metadata(description = "The log message to output. Supports simple language expressions.")
private String message;
@XmlAttribute
- @Metadata(javaType = "org.apache.camel.LoggingLevel", defaultValue = "INFO", enums = "TRACE,DEBUG,INFO,WARN,ERROR,OFF")
+ @Metadata(javaType = "org.apache.camel.LoggingLevel", defaultValue = "INFO", enums = "TRACE,DEBUG,INFO,WARN,ERROR,OFF",
+ description = "The logging level to use. Default is INFO.")
@DslArg(position = 0, renderType = "enumString", typeName = "LoggingLevel")
private String loggingLevel;
@XmlAttribute
+ @Metadata(description = "The logger name to use. By default the route id is used.")
private String logName;
@XmlAttribute
- @Metadata(label = "advanced")
+ @Metadata(label = "advanced",
+ description = "An optional SLF4J marker to use with the log statement.")
private String marker;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "org.slf4j.Logger")
+ @Metadata(label = "advanced", javaType = "org.slf4j.Logger",
+ description = "Reference to a custom SLF4J logger instance to use.")
private String logger;
@XmlAttribute
- @Metadata(label = "advanced")
+ @Metadata(label = "advanced",
+ description = "The language to use for evaluating the log message, such as simple, groovy, or ognl.")
private String logLanguage;
public LogDefinition() {
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/MulticastDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/MulticastDefinition.java
index 68139539528e..dcae91f5ecc2 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/MulticastDefinition.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/MulticastDefinition.java
@@ -49,41 +49,64 @@ public class MulticastDefinition extends OutputDefinition<MulticastDefinition>
private Processor onPrepareProcessor;
@XmlAttribute
- @Metadata(javaType = "org.apache.camel.AggregationStrategy")
+ @Metadata(javaType = "org.apache.camel.AggregationStrategy",
+ description = "Reference to the AggregationStrategy to assemble the replies from the multicasts"
+ + " into a single outgoing message. By default Camel uses the last reply as the outgoing message.")
private String aggregationStrategy;
@XmlAttribute
- @Metadata(label = "advanced")
+ @Metadata(label = "advanced",
+ description = "The method name to use when using a POJO as the AggregationStrategy.")
private String aggregationStrategyMethodName;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.lang.Boolean")
+ @Metadata(label = "advanced", javaType = "java.lang.Boolean",
+ description = "If true then null is used as the oldExchange when there is no data to aggregate,"
+ + " when using POJOs as the AggregationStrategy.")
private String aggregationStrategyMethodAllowNull;
@Deprecated(since = "4.7.0")
@XmlAttribute
@Metadata(label = "advanced", javaType = "java.lang.Boolean")
private String parallelAggregate;
@XmlAttribute
- @Metadata(javaType = "java.lang.Boolean")
+ @Metadata(javaType = "java.lang.Boolean",
+ description = "If enabled then sending messages to the multicasts occurs concurrently."
+ + " The caller thread still waits until all messages are fully processed before it continues.")
private String parallelProcessing;
@XmlAttribute
- @Metadata(javaType = "java.lang.Boolean")
+ @Metadata(javaType = "java.lang.Boolean",
+ description = "When enabled then the same thread is used to continue routing after the multicast is complete,"
+ + " even if parallel processing is enabled.")
private String synchronous;
@XmlAttribute
- @Metadata(javaType = "java.lang.Boolean")
+ @Metadata(javaType = "java.lang.Boolean",
+ description = "If enabled then Camel will process replies out-of-order, in the order they come back."
+ + " If disabled, Camel will process replies in the same order as defined by the multicast.")
private String streaming;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.lang.Boolean")
+ @Metadata(label = "advanced", javaType = "java.lang.Boolean",
+ description = "If enabled then stops further multicast processing if an exception or failure occurred"
+ + " during processing of an exchange, and the caused exception will be thrown."
+ + " The default behavior is to not stop but continue processing till the end.")
private String stopOnException;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.time.Duration", defaultValue = "0")
+ @Metadata(label = "advanced", javaType = "java.time.Duration", defaultValue = "0",
+ description = "Total timeout in millis when using parallel processing."
+ + " If the multicast has not been able to process all replies within the given timeframe,"
+ + " then the timeout triggers and the multicast breaks out and continues.")
private String timeout;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService")
+ @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService",
+ description = "Reference to a custom thread pool to use for parallel processing."
+ + " Setting this option implies parallel processing.")
private String executorService;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "org.apache.camel.Processor")
+ @Metadata(label = "advanced", javaType = "org.apache.camel.Processor",
+ description = "Reference to a processor for preparing the exchange to be sent."
+ + " Can be used to deep-clone messages that should be sent.")
private String onPrepare;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.lang.Boolean")
+ @Metadata(label = "advanced", javaType = "java.lang.Boolean",
+ description = "Shares the unit of work with the parent and each of the multicast exchanges."
+ + " By default each multicast exchange has its own individual unit of work.")
private String shareUnitOfWork;
public MulticastDefinition() {
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/SplitDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/SplitDefinition.java
index a32db4e58602..02ed41c4546f 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/SplitDefinition.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/SplitDefinition.java
@@ -46,44 +46,71 @@ public class SplitDefinition extends OutputExpressionNode implements ExecutorSer
private Processor onPrepareProcessor;
@XmlAttribute
- @Metadata(defaultValue = ",")
+ @Metadata(defaultValue = ",",
+ description = "Delimiter used in splitting messages. Can be turned off using the value false."
+ + " To force not splitting then the delimiter can be set to single to use the value as a single list."
+ + " The default value is comma.")
private String delimiter;
@XmlAttribute
- @Metadata(javaType = "org.apache.camel.AggregationStrategy")
+ @Metadata(javaType = "org.apache.camel.AggregationStrategy",
+ description = "Reference to the AggregationStrategy to assemble the replies from the split messages"
+ + " into a single outgoing message. By default Camel uses the original incoming message.")
private String aggregationStrategy;
@XmlAttribute
- @Metadata(label = "advanced")
+ @Metadata(label = "advanced",
+ description = "The method name to use when using a POJO as the AggregationStrategy.")
private String aggregationStrategyMethodName;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.lang.Boolean")
+ @Metadata(label = "advanced", javaType = "java.lang.Boolean",
+ description = "If true then null is used as the oldExchange when there is no data to aggregate,"
+ + " when using POJOs as the AggregationStrategy.")
private String aggregationStrategyMethodAllowNull;
@Deprecated(since = "4.7.0")
@XmlAttribute
@Metadata(label = "advanced", javaType = "java.lang.Boolean")
private String parallelAggregate;
@XmlAttribute
- @Metadata(javaType = "java.lang.Boolean")
+ @Metadata(javaType = "java.lang.Boolean",
+ description = "If enabled then processing each split message occurs concurrently."
+ + " The caller thread still waits until all messages are fully processed before it continues.")
private String parallelProcessing;
@XmlAttribute
- @Metadata(javaType = "java.lang.Boolean")
+ @Metadata(javaType = "java.lang.Boolean",
+ description = "When enabled then the same thread is used to continue routing after the split is complete,"
+ + " even if parallel processing is enabled.")
private String synchronous;
@XmlAttribute
- @Metadata(javaType = "java.lang.Boolean")
+ @Metadata(javaType = "java.lang.Boolean",
+ description = "When enabled then the splitter splits the original message on-demand,"
+ + " and each split message is processed one by one. This reduces memory usage"
+ + " as the splitter does not split all messages first.")
private String streaming;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.lang.Boolean")
+ @Metadata(label = "advanced", javaType = "java.lang.Boolean",
+ description = "If enabled then stops further split processing if an exception or failure occurred"
+ + " during processing of a split message, and the caused exception will be thrown."
+ + " The default behavior is to not stop but continue processing till the end.")
private String stopOnException;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.time.Duration", defaultValue = "0")
+ @Metadata(label = "advanced", javaType = "java.time.Duration", defaultValue = "0",
+ description = "Total timeout in millis when using parallel processing."
+ + " If the splitter has not been able to process all replies within the given timeframe,"
+ + " then the timeout triggers and the splitter breaks out and continues.")
private String timeout;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService")
+ @Metadata(label = "advanced", javaType = "java.util.concurrent.ExecutorService",
+ description = "Reference to a custom thread pool to use for parallel processing."
+ + " Setting this option implies parallel processing.")
private String executorService;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "org.apache.camel.Processor")
+ @Metadata(label = "advanced", javaType = "org.apache.camel.Processor",
+ description = "Reference to a processor for preparing the exchange to be sent."
+ + " Can be used to deep-clone messages that should be sent.")
private String onPrepare;
@XmlAttribute
- @Metadata(label = "advanced", javaType = "java.lang.Boolean")
+ @Metadata(label = "advanced", javaType = "java.lang.Boolean",
+ description = "Shares the unit of work with the parent and each of the split messages."
+ + " By default each split exchange has its own individual unit of work.")
private String shareUnitOfWork;
public SplitDefinition() {