@Metadata(label="eip,endpoint,routing") public class RecipientListDefinition<Type extends ProcessorDefinition<Type>> extends ExpressionNode implements ExecutorServiceAwareDefinition<RecipientListDefinition<Type>>
inheritErrorHandler, log
Constructor and Description |
---|
RecipientListDefinition() |
RecipientListDefinition(org.apache.camel.Expression expression) |
RecipientListDefinition(ExpressionDefinition expression) |
Modifier and Type | Method and Description |
---|---|
RecipientListDefinition<Type> |
aggregationStrategy(org.apache.camel.AggregationStrategy aggregationStrategy)
Sets the AggregationStrategy to be used to assemble the replies from the recipients, into a single outgoing
message from the RecipientList.
|
RecipientListDefinition<Type> |
aggregationStrategy(Supplier<org.apache.camel.AggregationStrategy> aggregationStrategy)
Sets the AggregationStrategy to be used to assemble the replies from the recipients, into a single outgoing
message from the RecipientList.
|
RecipientListDefinition<Type> |
aggregationStrategyMethodAllowNull()
If this option is false then the aggregate method is not used if there was no data to enrich.
|
RecipientListDefinition<Type> |
aggregationStrategyMethodName(String methodName)
This option can be used to explicit declare the method name to use, when using POJOs as the AggregationStrategy.
|
RecipientListDefinition<Type> |
aggregationStrategyRef(String aggregationStrategyRef)
Sets a reference to the AggregationStrategy to be used to assemble the replies from the recipients, into a single
outgoing message from the RecipientList.
|
RecipientListDefinition<Type> |
cacheSize(int cacheSize)
Sets the maximum size used by the
ProducerCache which is used to cache and reuse
producers when using this recipient list, when uris are reused. |
RecipientListDefinition<Type> |
cacheSize(String cacheSize)
Sets the maximum size used by the
ProducerCache which is used to cache and reuse
producers when using this recipient list, when uris are reused. |
RecipientListDefinition<Type> |
delimiter(String delimiter)
Delimiter used if the Expression returned multiple endpoints.
|
Type |
end()
Ends the current block
|
RecipientListDefinition<Type> |
executorService(ExecutorService executorService)
To use a custom Thread Pool to be used for parallel processing.
|
RecipientListDefinition<Type> |
executorServiceRef(String executorServiceRef)
Refers to a custom Thread Pool to be used for parallel processing.
|
org.apache.camel.AggregationStrategy |
getAggregationStrategy() |
String |
getCacheSize() |
String |
getDelimiter() |
ExecutorService |
getExecutorService() |
String |
getExecutorServiceRef() |
String |
getIgnoreInvalidEndpoints() |
String |
getLabel()
Returns a label to describe this node such as the expression if some kind of expression node
|
org.apache.camel.Processor |
getOnPrepare() |
String |
getOnPrepareRef() |
String |
getParallelAggregate() |
String |
getParallelProcessing() |
String |
getShareUnitOfWork() |
String |
getShortName() |
String |
getStopOnAggregateException() |
String |
getStopOnException() |
String |
getStrategyMethodAllowNull() |
String |
getStrategyMethodName() |
String |
getStrategyRef() |
String |
getStreaming() |
String |
getTimeout() |
RecipientListDefinition<Type> |
ignoreInvalidEndpoints()
Ignore the invalidate endpoint exception when try to create a producer with that endpoint
|
ProcessClause<RecipientListDefinition<Type>> |
onPrepare()
Sets the
Processor when preparing the Exchange to be used send using a fluent
buidler. |
RecipientListDefinition<Type> |
onPrepare(org.apache.camel.Processor onPrepare)
Uses the
Processor when preparing the Exchange to be used send. |
RecipientListDefinition<Type> |
onPrepareRef(String onPrepareRef)
Uses the
Processor when preparing the Exchange to be send. |
RecipientListDefinition<Type> |
parallelAggregate()
If enabled then the aggregate method on AggregationStrategy can be called concurrently.
|
RecipientListDefinition<Type> |
parallelProcessing()
If enabled then sending messages to the recipients occurs concurrently.
|
RecipientListDefinition<Type> |
parallelProcessing(boolean parallelProcessing)
If enabled then sending messages to the recipients occurs concurrently.
|
void |
setAggregationStrategy(org.apache.camel.AggregationStrategy aggregationStrategy)
Sets the AggregationStrategy to be used to assemble the replies from the recipients, into a single outgoing
message from the RecipientList.
|
void |
setCacheSize(String cacheSize) |
void |
setDelimiter(String delimiter) |
void |
setExecutorService(ExecutorService executorService) |
void |
setExecutorServiceRef(String executorServiceRef) |
void |
setExpression(ExpressionDefinition expression)
Expression that returns which endpoints (url) to send the message to (the recipients).
|
void |
setIgnoreInvalidEndpoints(String ignoreInvalidEndpoints) |
void |
setOnPrepare(org.apache.camel.Processor onPrepare) |
void |
setOnPrepareRef(String onPrepareRef) |
void |
setParallelAggregate(String parallelAggregate) |
void |
setParallelProcessing(String parallelProcessing) |
void |
setShareUnitOfWork(String shareUnitOfWork) |
void |
setStopOnAggregateException(String stopOnAggregateException) |
void |
setStopOnException(String stopOnException) |
void |
setStrategyMethodAllowNull(String strategyMethodAllowNull)
If this option is false then the aggregate method is not used if there was no data to enrich.
|
void |
setStrategyMethodName(String strategyMethodName)
This option can be used to explicit declare the method name to use, when using POJOs as the AggregationStrategy.
|
void |
setStrategyRef(String strategyRef)
Sets a reference to the AggregationStrategy to be used to assemble the replies from the recipients, into a single
outgoing message from the RecipientList.
|
void |
setStreaming(String streaming) |
void |
setTimeout(String timeout) |
RecipientListDefinition<Type> |
shareUnitOfWork()
Shares the
UnitOfWork with the parent and each of the sub messages. |
RecipientListDefinition<Type> |
stopOnAggregateException()
If enabled, unwind exceptions occurring at aggregation time to the error handler when parallelProcessing is used.
|
RecipientListDefinition<Type> |
stopOnException()
Will now stop further processing if an exception or failure occurred during processing of an
Exchange and the caused exception will be thrown. |
RecipientListDefinition<Type> |
streaming()
If enabled then Camel will process replies out-of-order, eg in the order they come back.
|
RecipientListDefinition<Type> |
timeout(long timeout)
Sets a total timeout specified in millis, when using parallel processing.
|
String |
toString() |
configureChild, getExpression, getExpressionType, getOutputs, id, preCreateProcessor, setExpression, setExpressionType
addInterceptStrategy, addOutput, aggregate, aggregate, aggregate, aggregate, bean, bean, bean, bean, bean, bean, bean, bean, bean, bean, bean, choice, circuitBreaker, claimCheck, claimCheck, claimCheck, claimCheck, clearOutput, convertBodyTo, convertBodyTo, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, endChoice, endCircuitBreaker, endDoTry, endParent, endRest, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrichWith, enrichWith, enrichWith, enrichWith, enrichWith, enrichWith, filter, filter, filter, filter, getIndex, getInterceptStrategies, getParent, idempotentConsumer, idempotentConsumer, idempotentConsumer, inheritErrorHandler, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, isAbstract, isInheritErrorHandler, isTopLevelOnly, isWrappingEntireOutput, kamelet, loadBalance, loadBalance, log, log, log, log, log, log, loop, loop, loop, loopDoWhile, loopDoWhile, markRollbackOnly, markRollbackOnlyLast, marshal, marshal, marshal, marshal, multicast, multicast, multicast, onCompletion, onException, onException, pipeline, pipeline, pipeline, pipeline, policy, policy, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, process, process, process, recipientList, recipientList, recipientList, recipientList, removeHeader, removeHeaders, removeHeaders, removeProperties, removeProperties, removeProperty, resequence, resequence, rollback, rollback, routeDescription, routeGroup, routeId, routingSlip, routingSlip, routingSlip, saga, sample, sample, sample, sample, script, script, serviceCall, serviceCall, serviceCall, setBody, setBody, setBody, setExchangePattern, setHeader, setHeader, setHeader, setInheritErrorHandler, setParent, setProperty, setProperty, setProperty, sort, sort, sort, split, split, split, split, startupOrder, step, step, stop, threads, threads, threads, threads, throttle, throttle, throttle, throttle, throttle, throwException, throwException, to, to, to, to, to, to, to, to, to, to, to, to, to, to, toD, toD, toD, toD, toD, toD, toD, toF, transacted, transacted, transform, transform, unmarshal, unmarshal, unmarshal, unmarshal, validate, validate, validate, wireTap, wireTap, wireTap
description, description, getCustomId, getDescription, getDescriptionText, getId, hasCustomIdAssigned, idOrCreate, setCustomId, setDescription, setGeneratedId, setId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
executorService
public RecipientListDefinition()
public RecipientListDefinition(ExpressionDefinition expression)
public RecipientListDefinition(org.apache.camel.Expression expression)
public String getShortName()
getShortName
in interface org.apache.camel.NamedNode
public String getLabel()
ProcessorDefinition
getLabel
in interface org.apache.camel.NamedNode
getLabel
in class ExpressionNode
public Type end()
ProcessorDefinition
end
in class ProcessorDefinition<ExpressionNode>
public RecipientListDefinition<Type> delimiter(String delimiter)
delimiter
- the delimiterpublic RecipientListDefinition<Type> aggregationStrategy(org.apache.camel.AggregationStrategy aggregationStrategy)
public RecipientListDefinition<Type> aggregationStrategy(Supplier<org.apache.camel.AggregationStrategy> aggregationStrategy)
public RecipientListDefinition<Type> aggregationStrategyRef(String aggregationStrategyRef)
public RecipientListDefinition<Type> aggregationStrategyMethodName(String methodName)
methodName
- the method name to callpublic RecipientListDefinition<Type> aggregationStrategyMethodAllowNull()
public RecipientListDefinition<Type> ignoreInvalidEndpoints()
public RecipientListDefinition<Type> parallelProcessing()
public RecipientListDefinition<Type> parallelProcessing(boolean parallelProcessing)
public RecipientListDefinition<Type> parallelAggregate()
public RecipientListDefinition<Type> stopOnAggregateException()
false
for the sake of backward
compatibility.public RecipientListDefinition<Type> streaming()
public RecipientListDefinition<Type> stopOnException()
Exchange
and the caused exception will be thrown.
Will also stop if processing the exchange failed (has a fault message) or an exception was thrown and handled by
the error handler (such as using onException). In all situations the recipient list will stop further processing.
This is the same behavior as in pipeline, which is used by the routing engine.
The default behavior is to not stop but continue processing till the endpublic RecipientListDefinition<Type> executorService(ExecutorService executorService)
executorService
in interface ExecutorServiceAwareDefinition<RecipientListDefinition<Type extends ProcessorDefinition<Type>>>
executorService
- the executor servicepublic RecipientListDefinition<Type> executorServiceRef(String executorServiceRef)
executorServiceRef
in interface ExecutorServiceAwareDefinition<RecipientListDefinition<Type extends ProcessorDefinition<Type>>>
executorServiceRef
- reference for a ExecutorService
to lookup in the
Registry
public RecipientListDefinition<Type> onPrepare(org.apache.camel.Processor onPrepare)
Processor
when preparing the Exchange
to be used send. This can be used
to deep-clone messages that should be send, or any custom logic needed before the exchange is send.onPrepare
- the processorpublic ProcessClause<RecipientListDefinition<Type>> onPrepare()
Processor
when preparing the Exchange
to be used send using a fluent
buidler.public RecipientListDefinition<Type> onPrepareRef(String onPrepareRef)
Processor
when preparing the Exchange
to be send. This can be used to
deep-clone messages that should be send, or any custom logic needed before the exchange is send.onPrepareRef
- reference to the processor to lookup in the Registry
public RecipientListDefinition<Type> timeout(long timeout)
timeout
- timeout in millispublic RecipientListDefinition<Type> shareUnitOfWork()
UnitOfWork
with the parent and each of the sub messages. Recipient List
will by default not share unit of work between the parent exchange and each recipient exchange. This means each
sub exchange has its own individual unit of work.public RecipientListDefinition<Type> cacheSize(int cacheSize)
ProducerCache
which is used to cache and reuse
producers when using this recipient list, when uris are reused.
Beware that when using dynamic endpoints then it affects how well the cache can be utilized. If each dynamic
endpoint is unique then its best to turn of caching by setting this to -1, which allows Camel to not cache both
the producers and endpoints; they are regarded as prototype scoped and will be stopped and discarded after use.
This reduces memory usage as otherwise producers/endpoints are stored in memory in the caches.
However if there are a high degree of dynamic endpoints that have been used before, then it can benefit to use
the cache to reuse both producers and endpoints and therefore the cache size can be set accordingly or rely on
the default size (1000).
If there is a mix of unique and used before dynamic endpoints, then setting a reasonable cache size can help
reduce memory usage to avoid storing too many non frequent used producers.cacheSize
- the cache size, use 0 for default cache size, or -1 to turn cache off.public RecipientListDefinition<Type> cacheSize(String cacheSize)
ProducerCache
which is used to cache and reuse
producers when using this recipient list, when uris are reused.
Beware that when using dynamic endpoints then it affects how well the cache can be utilized. If each dynamic
endpoint is unique then its best to turn of caching by setting this to -1, which allows Camel to not cache both
the producers and endpoints; they are regarded as prototype scoped and will be stopped and discarded after use.
This reduces memory usage as otherwise producers/endpoints are stored in memory in the caches.
However if there are a high degree of dynamic endpoints that have been used before, then it can benefit to use
the cache to reuse both producers and endpoints and therefore the cache size can be set accordingly or rely on
the default size (1000).
If there is a mix of unique and used before dynamic endpoints, then setting a reasonable cache size can help
reduce memory usage to avoid storing too many non frequent used producers.cacheSize
- the cache size, use 0 for default cache size, or -1 to turn cache off.public void setExpression(ExpressionDefinition expression)
setExpression
in class ExpressionNode
public String getDelimiter()
public void setDelimiter(String delimiter)
public String getParallelProcessing()
public void setParallelProcessing(String parallelProcessing)
public String getStrategyRef()
public void setStrategyRef(String strategyRef)
public String getStrategyMethodName()
public void setStrategyMethodName(String strategyMethodName)
public String getStrategyMethodAllowNull()
public void setStrategyMethodAllowNull(String strategyMethodAllowNull)
public String getExecutorServiceRef()
getExecutorServiceRef
in interface org.apache.camel.ExecutorServiceAware
public void setExecutorServiceRef(String executorServiceRef)
setExecutorServiceRef
in interface org.apache.camel.ExecutorServiceAware
public String getIgnoreInvalidEndpoints()
public void setIgnoreInvalidEndpoints(String ignoreInvalidEndpoints)
public String getStopOnException()
public void setStopOnException(String stopOnException)
public org.apache.camel.AggregationStrategy getAggregationStrategy()
public void setAggregationStrategy(org.apache.camel.AggregationStrategy aggregationStrategy)
public ExecutorService getExecutorService()
getExecutorService
in interface org.apache.camel.ExecutorServiceAware
public void setExecutorService(ExecutorService executorService)
setExecutorService
in interface org.apache.camel.ExecutorServiceAware
public String getStreaming()
public void setStreaming(String streaming)
public String getTimeout()
public void setTimeout(String timeout)
public String getOnPrepareRef()
public void setOnPrepareRef(String onPrepareRef)
public org.apache.camel.Processor getOnPrepare()
public void setOnPrepare(org.apache.camel.Processor onPrepare)
public String getShareUnitOfWork()
public void setShareUnitOfWork(String shareUnitOfWork)
public String getCacheSize()
public void setCacheSize(String cacheSize)
public String getParallelAggregate()
public void setParallelAggregate(String parallelAggregate)
public String getStopOnAggregateException()
public void setStopOnAggregateException(String stopOnAggregateException)
Apache Camel