Interface IRouteDefinition
New fluent DSL for defining a message route using the canonical ProcessorDefinition model.
All leaf methods return for chaining.
Scope-opener methods (Filter, Choice, Split, TryCatch, etc.) return the opened definition
and expose an End()/EndXxx() method that returns the parent definition.
public interface IRouteDefinition : IProcessorDefinition
Methods
AddAttachment(string, IExpression, IExpression, string?)
As with the file name evaluated per message.
IRouteDefinition AddAttachment(string name, IExpression content, IExpression fileName, string? contentType = null)
AddAttachment(string, IExpression, string?, string?)
Adds an attachment to the message with the value of content (byte[], string as
IRouteDefinition AddAttachment(string name, IExpression content, string? fileName = null, string? contentType = null)
AddAttachmentFromBody(string, IExpression, string?)
As with the file name evaluated per message.
IRouteDefinition AddAttachmentFromBody(string name, IExpression fileName, string? contentType = null)
AddAttachmentFromBody(string, string?, string?)
Adds the message body as an attachment; the body stays. The content type defaults to the message's. The text
IRouteDefinition AddAttachmentFromBody(string name, string? fileName = null, string? contentType = null)
AddAttachmentFromFile(IExpression, string?, string?)
As with the path evaluated per message.
IRouteDefinition AddAttachmentFromFile(IExpression path, string? name = null, string? contentType = null)
AddAttachmentFromFile(string, string?, string?)
Adds the file at path as an attachment, read from disk whenever it is sent; the name and file
IRouteDefinition AddAttachmentFromFile(string path, string? name = null, string? contentType = null)
Aggregate(Func<IExchange, string>, Func<IExchange, IExchange, IExchange>, Func<IExchange, bool>)
Opens an Aggregate scope. Collects exchanges by correlation key and forwards completed
AggregateDefinition Aggregate(Func<IExchange, string> correlationKey, Func<IExchange, IExchange, IExchange> aggregationStrategy, Func<IExchange, bool> completionPredicate)
Aggregate(IExpression, Func<IExchange, IExchange, IExchange>, Func<IExchange, bool>)
Opens an Aggregate scope whose correlation key comes from an expression, e.g.
AggregateDefinition Aggregate(IExpression correlationKey, Func<IExchange, IExchange, IExchange> aggregationStrategy, Func<IExchange, bool> completionPredicate)
AutoStart(bool)
Sets whether this route should auto-start. Default is true.
IRouteDefinition AutoStart(bool value = true)
Bean(string, string?)
Apache Camel's bean(ref, method): calls user code through the bean: component, as the step
IRouteDefinition Bean(string reference, string? method = null)
Bean<TService>(Action<TService, IExchange>)
Resolves TService from the exchange's ServiceProvider and invokes a synchronous method.
IRouteDefinition Bean<TService>(Action<TService, IExchange> method)
Bean<TService>(Func<TService, IExchange, CancellationToken, Task>)
Resolves TService from the exchange's ServiceProvider and invokes method.
IRouteDefinition Bean<TService>(Func<TService, IExchange, CancellationToken, Task> method)
Bean<TService>(Func<TService, IExchange, Task>)
Resolves TService from the exchange's ServiceProvider and invokes method (no cancellation token).
IRouteDefinition Bean<TService>(Func<TService, IExchange, Task> method)
BeginTransaction()
Begins an imperative transaction scope on the exchange (default Required policy).
IRouteDefinition BeginTransaction()
BeginTransaction(TransactionPolicy)
Begins an imperative transaction scope with the specified .
IRouteDefinition BeginTransaction(TransactionPolicy policy)
CircuitBreaker()
Opens a CircuitBreaker scope. Configure options before adding downstream steps.
CircuitBreakerDefinition CircuitBreaker()
ClaimCheck(ClaimCheckOperation, string?, TimeSpan?, string?)
Claim Check step (Hohpe/Woolf). Stores the body away and lets a short claim key travel
IRouteDefinition ClaimCheck(ClaimCheckOperation operation, string? key = null, TimeSpan? ttl = null, string? repositoryName = null)
ClaimCheck(IClaimCheckRepository, ClaimCheckOperation, string?, TimeSpan?)
Claim Check step against an explicit repository instance.
IRouteDefinition ClaimCheck(IClaimCheckRepository repository, ClaimCheckOperation operation, string? key = null, TimeSpan? ttl = null)
Cluster(bool)
Sets whether this route participates in cluster-aware routing. Default: false.
IRouteDefinition Cluster(bool value = true)
CommitTransaction()
Commits the imperative transaction scope and all deferred actions.
IRouteDefinition CommitTransaction()
ControlBus(ControlBusAction, string, bool)
Apache Camel controlbus: parity: manage a route at runtime (start/stop/suspend/resume/restart/status/stats/fail).
IRouteDefinition ControlBus(ControlBusAction action, string routeId, bool async = false)
ConvertBody(Type)
Apache Camel parity: convert the exchange body to targetType.
IRouteDefinition ConvertBody(Type targetType)
ConvertBody<T>()
Apache Camel parity: convert the exchange body to T.
IRouteDefinition ConvertBody<T>()
Debounce(Func<IExchange, string>, TimeSpan)
Opens a Debounce scope. Suppresses rapid-fire messages per key, forwarding only the last
DebounceDefinition Debounce(Func<IExchange, string> keyExtractor, TimeSpan quietPeriod)
Delay(Func<IExchange, TimeSpan>)
Delays processing by a dynamic duration computed from the exchange.
IRouteDefinition Delay(Func<IExchange, TimeSpan> factory)
Delay(string)
Delays by a route-language expression evaluated per message: milliseconds ("${header.backoff}", "header.attempt * 500"), a , or hh:mm:ss text.
IRouteDefinition Delay(string durationExpression)
Description(string)
Gives the most recently added step a human-readable label (Apache Camel description()).
IRouteDefinition Description(string description)
DynamicRouter(Func<IExchange, string?>)
Apache Camel parity: iteratively route to URIs returned by a routing function.
IRouteDefinition DynamicRouter(Func<IExchange, string?> routingFunction)
DynamicRouter(IExpression)
Dynamic router whose next hop comes from an expression; no value ends the routing.
IRouteDefinition DynamicRouter(IExpression routingExpression)
Enrich(Func<IExchange, string>, Func<IExchange, IExchange, IExchange>)
Content enricher with a dynamic endpoint URI computed per message.
IRouteDefinition Enrich(Func<IExchange, string> uriFactory, Func<IExchange, IExchange, IExchange> mergeStrategy)
Enrich(Func<IExchange, string>)
Enrich with a dynamic URI and no strategy: the response becomes the current message.
IRouteDefinition Enrich(Func<IExchange, string> uriFactory)
Enrich(IExpression, Func<IExchange, IExchange, IExchange>)
Content enricher whose endpoint URI comes from an expression, e.g. Enrich(XPath("/order/service"), merge).
IRouteDefinition Enrich(IExpression uri, Func<IExchange, IExchange, IExchange> mergeStrategy)
Enrich(IExpression)
Content enricher from an expression, keeping the enriched result (UseLatest).
IRouteDefinition Enrich(IExpression uri)
Enrich(string, Func<IExchange, IExchange, IExchange>)
Content enricher — calls an endpoint and merges the result.
IRouteDefinition Enrich(string resourceUri, Func<IExchange, IExchange, IExchange> mergeStrategy)
Enrich(string)
Enrich without a strategy: the response becomes the current message (Camel default, AggregationStrategies.UseLatest()).
IRouteDefinition Enrich(string resourceUri)
ExceptionHandled()
Marks the exchange exception as handled: clears the exception and sets ExceptionHandled = true.
IRouteDefinition ExceptionHandled()
Filter(Func<IExchange, bool>)
Opens a Filter scope. Only exchanges matching the predicate will be processed by steps
FilterDefinition Filter(Func<IExchange, bool> predicate)
Filter(IExpression)
Opens a Filter scope using an predicate.
FilterDefinition Filter(IExpression expression)
Filter(IPredicate)
Opens a Filter scope guarded by an . The predicate is stored as the
FilterDefinition Filter(IPredicate predicate)
GetMessageHistory()
Gets the route-level message-history override (null = inherit the global setting).
bool? GetMessageHistory()
GetRoutePolicy()
Gets the explicitly set route policy, or null if not set.
IRoutePolicy? GetRoutePolicy()
GetTracing()
Gets the route-level tracing override (null = inherit the global setting).
bool? GetTracing()
Id(string)
Names the most recently added step (Apache Camel id()), for AdviceWith weaving
IRouteDefinition Id(string id)
IdempotentConsumer(Func<IExchange, string>, string, bool)
Opens an Idempotent Consumer scope with the repository looked up by registered name at
IdempotentConsumerDefinition IdempotentConsumer(Func<IExchange, string> keyExtractor, string repositoryName, bool skipDuplicate = true)
IdempotentConsumer(IExpression, string, bool)
Idempotent Consumer from an expression, with the repository looked up by registered name.
IdempotentConsumerDefinition IdempotentConsumer(IExpression messageId, string repositoryName, bool skipDuplicate = true)
IdempotentConsumer(IIdempotentRepository, Func<IExchange, string>, bool)
Opens an Idempotent Consumer scope. Duplicate exchanges (same key) are skipped.
IdempotentConsumerDefinition IdempotentConsumer(IIdempotentRepository repository, Func<IExchange, string> keyExtractor, bool skipDuplicate = true)
IdempotentConsumer(IIdempotentRepository, IExpression, bool)
Idempotent Consumer whose message id comes from an expression, e.g. IdempotentConsumer(repo, jpath("$.messageId")).
IdempotentConsumerDefinition IdempotentConsumer(IIdempotentRepository repository, IExpression messageId, bool skipDuplicate = true)
Intercept()
Opens steps that run before every step of this route, including steps nested in scopes (Camel intercept()). Close with EndIntercept().
InterceptDefinition Intercept()
InterceptFrom(string?)
Opens steps that run once when a message enters the route, optionally only for a From URI matching the mask (Camel interceptFrom()).
InterceptDefinition InterceptFrom(string? uriPattern = null)
InterceptSendToEndpoint(string)
Opens steps that run before a To / ToD whose target matches the mask; .SkipSendToOriginalEndpoint() replaces the send (Camel interceptSendToEndpoint()...
InterceptDefinition InterceptSendToEndpoint(string uriPattern)
LoadBalance(Action<ILoadBalancerDefinition>)
Adds a load-balance step configured via a builder callback.
IRouteDefinition LoadBalance(Action<ILoadBalancerDefinition> configure)
LoadBalance(ILoadBalancerStrategy, params string[])
Adds a load-balance step with the specified strategy and endpoint URIs.
IRouteDefinition LoadBalance(ILoadBalancerStrategy strategy, params string[] uris)
Log(Func<IExchange, string>, LogLevel)
Logs a dynamic message from a factory.
IRouteDefinition Log(Func<IExchange, string> messageFactory, LogLevel level = LogLevel.Information)
Log(string, LogLevel)
Logs a static message.
IRouteDefinition Log(string message, LogLevel level = LogLevel.Information)
Loop(Func<IExchange, bool>, bool, bool)
Opens a Loop scope that repeats the body pipeline while condition holds.
LoopDefinition Loop(Func<IExchange, bool> condition, bool copy = false, bool shareScope = true)
Loop(Func<IExchange, int>, bool, bool)
Opens a Loop scope that repeats the body pipeline a number of times resolved from the exchange at runtime.
LoopDefinition Loop(Func<IExchange, int> countFactory, bool copy = false, bool shareScope = true)
Loop(int, bool, bool)
Opens a Loop scope that repeats the body pipeline count times.
LoopDefinition Loop(int count, bool copy = false, bool shareScope = true)
Loop(IPredicate, bool, bool)
Opens a Loop scope that repeats while an holds; the predicate is
LoopDefinition Loop(IPredicate condition, bool copy = false, bool shareScope = true)
Loop(string, bool, bool)
Loop whose iteration count is a route-language expression evaluated per message ("${header.count}", "header.items.Count"); for a condition use LoopWhi...
LoopDefinition Loop(string countExpression, bool copy = false, bool shareScope = true)
Marshal(IMessageSerializer)
Marshals the body with a configured serializer instance (per-node options): Marshal(new CsvDataFormat(o)).
IRouteDefinition Marshal(IMessageSerializer serializer)
Marshal(string)
Marshals the body with the data format registered for contentType ("text/csv"); an unregistered format fails Start().
IRouteDefinition Marshal(string contentType)
Marshal(Type)
Marshals (serializes) the exchange body using the specified serializer type.
IRouteDefinition Marshal(Type serializerType)
Marshal<TSerializer>()
Marshals (serializes) the exchange body using the specified serializer type.
IRouteDefinition Marshal<TSerializer>() where TSerializer : class
MessageHistory(bool)
Apache Camel parity: enable/disable per-node message history for this route, overriding
IRouteDefinition MessageHistory(bool value = true)
Metered(string, Action<IExchange>)
Inline metering — wraps a single synchronous action in a MeteredStepProcessor tagged with stepName.
IRouteDefinition Metered(string stepName, Action<IExchange> action)
Metered(string, Func<IExchange, CancellationToken, Task>)
Inline metering — wraps an asynchronous action in a MeteredStepProcessor tagged with stepName.
IRouteDefinition Metered(string stepName, Func<IExchange, CancellationToken, Task> action)
Metered(string, IProcessor)
Inline metering — wraps an in a MeteredStepProcessor tagged with stepName.
IRouteDefinition Metered(string stepName, IProcessor processor)
Metered(string)
Opens a metrics scope. All child steps are measured by MeteredStepProcessor
MeteredDefinition Metered(string stepName)
Multicast()
Opens a Multicast scope (fan-out). Add targets with .To() / .Process().
MulticastDefinition Multicast()
Normalize(Action<INormalizerDefinition>)
Adds a normalizer step configured via a builder callback.
IRouteDefinition Normalize(Action<INormalizerDefinition> configure)
OfType<T>()
Apache Camel parity: open a typed scope auto-converting the body to T.
OfTypeDefinition<T> OfType<T>()
OnCompletion()
Opens steps that run after the route finished with an exchange, on a copy, outside the route's transaction (Camel onCompletion()). Close with EndOnCom...
OnCompletionDefinition OnCompletion()
OnException(params Type[])
Opens an OnException scope for multiple exception types.
OnExceptionDefinition OnException(params Type[] exceptionTypes)
OnException<TException>()
Opens an OnException scope for TException.
OnExceptionDefinition OnException<TException>() where TException : Exception
PollEnrich(Func<IExchange, string>, Func<IExchange, IExchange?, IExchange>, TimeSpan?)
Poll enricher with a dynamic endpoint URI computed per message.
IRouteDefinition PollEnrich(Func<IExchange, string> uriFactory, Func<IExchange, IExchange?, IExchange> mergeStrategy, TimeSpan? timeout = null)
PollEnrich(Func<IExchange, string>, TimeSpan?)
Poll enricher with a dynamic URI and no strategy: the polled message becomes the current one; on timeout the original stays.
IRouteDefinition PollEnrich(Func<IExchange, string> uriFactory, TimeSpan? timeout = null)
PollEnrich(IExpression, Func<IExchange, IExchange?, IExchange>, TimeSpan?)
Poll enricher whose endpoint URI comes from an expression.
IRouteDefinition PollEnrich(IExpression uri, Func<IExchange, IExchange?, IExchange> mergeStrategy, TimeSpan? timeout = null)
PollEnrich(IExpression, TimeSpan?)
Poll enricher from an expression with no strategy: the polled message becomes the current one.
IRouteDefinition PollEnrich(IExpression uri, TimeSpan? timeout = null)
PollEnrich(string, Func<IExchange, IExchange?, IExchange>, TimeSpan?)
Apache Camel parity: poll an external endpoint and merge the polled result.
IRouteDefinition PollEnrich(string resourceUri, Func<IExchange, IExchange?, IExchange> mergeStrategy, TimeSpan? timeout = null)
PollEnrich(string, TimeSpan?)
Poll enricher without a strategy: the polled message becomes the current one; on timeout the original stays.
IRouteDefinition PollEnrich(string resourceUri, TimeSpan? timeout = null)
Process(Action<IExchange>)
Processes the exchange with a synchronous action.
IRouteDefinition Process(Action<IExchange> action)
Process(Func<IExchange, CancellationToken, Task>)
Processes the exchange with an asynchronous action.
IRouteDefinition Process(Func<IExchange, CancellationToken, Task> action)
Process(IProcessor)
Processes the exchange with a pre-built processor instance.
IRouteDefinition Process(IProcessor processor)
ProcessingTimeout(TimeSpan)
Sets the per-exchange processing timeout for this route.
IRouteDefinition ProcessingTimeout(TimeSpan timeout)
RecipientList(Func<IExchange, IEnumerable<string>>, bool, bool, Func<IExchange, IExchange, IExchange>?)
Apache Camel parity: route to a list of recipient URIs computed at runtime.
IRouteDefinition RecipientList(Func<IExchange, IEnumerable<string>> recipientListFactory, bool parallelProcessing = false, bool stopOnException = false, Func<IExchange, IExchange, IExchange>? aggregationStrategy = null)
RecipientList(IExpression, bool, bool, Func<IExchange, IExchange, IExchange>?, string)
Recipient list from an expression yielding either a sequence of URIs or one delimited
IRouteDefinition RecipientList(IExpression recipients, bool parallelProcessing = false, bool stopOnException = false, Func<IExchange, IExchange, IExchange>? aggregationStrategy = null, string uriDelimiter = ",")
RemoveAttachment(string)
Removes the attachments named name.
IRouteDefinition RemoveAttachment(string name)
RemoveHeaders(string, params string[])
Removes every header whose name matches the mask (exact, trailing *, or regex:), except those listed.
IRouteDefinition RemoveHeaders(string pattern, params string[] except)
RemoveProperties(string, params string[])
Removes every exchange property whose key matches the mask, except those listed.
IRouteDefinition RemoveProperties(string pattern, params string[] except)
Replayable(string, Action<ReplayableDefinition>, bool)
Lambda-body form of ; the chain stays on the current definition.
IRouteDefinition Replayable(string name, Action<ReplayableDefinition> body, bool exposed = false)
Replayable(string, bool)
Opens a replay checkpoint (save-point). The steps that follow are the marker's body (the tail
ReplayableDefinition Replayable(string name, bool exposed = false)
Resequence(Func<IExchange, long>, int, TimeSpan?)
Apache Camel parity: open a Resequencer scope. Child outputs receive exchanges
ResequenceDefinition Resequence(Func<IExchange, long> keySelector, int batchSize = 100, TimeSpan? timeout = null)
RollbackAll()
Camel's markRollbackOnly(): marks the unit of work for rollback (the RollbackOnly property), rolls
IRouteDefinition RollbackAll()
RollbackTransaction()
Rolls back the imperative transaction scope and all deferred actions.
IRouteDefinition RollbackTransaction()
RouteConfigurationId(string)
Assigns route configurations to the route by id (Apache Camel's routeConfigurationId): several ids
IRouteDefinition RouteConfigurationId(string ids)
RoutePolicy(IRoutePolicy)
Sets an explicit route policy, overriding any factory-resolved policy.
IRouteDefinition RoutePolicy(IRoutePolicy policy)
RoutePolicy(string)
Attaches a route policy by its registry name: the instance is resolved
IRouteDefinition RoutePolicy(string policyName)
RoutingSlip(Func<IExchange, IEnumerable<string>>, bool)
Apache Camel parity: Routing Slip — pipe the exchange through a list of endpoints
IRouteDefinition RoutingSlip(Func<IExchange, IEnumerable<string>> slipFactory, bool ignoreInvalidEndpoints = false)
RoutingSlip(IExpression, string, bool)
Apache Camel parity: Routing Slip from an expression yielding a delimited URI string.
IRouteDefinition RoutingSlip(IExpression slip, string uriDelimiter = ",", bool ignoreInvalidEndpoints = false)
RoutingSlip(string, string, bool)
Apache Camel parity: Routing Slip from a ${...} template resolving to a delimited URI string.
IRouteDefinition RoutingSlip(string slipTemplate, string uriDelimiter = ",", bool ignoreInvalidEndpoints = false)
Saga(Action<ISagaDefinition>)
Adds a saga step configured via a builder callback.
IRouteDefinition Saga(Action<ISagaDefinition> configure)
Sample(long)
Samples messages by passing every N-th message (count-based).
IRouteDefinition Sample(long messageFrequency)
Sample(TimeSpan)
Samples messages by period — at most one message per period.
IRouteDefinition Sample(TimeSpan period)
ScatterGather(Action<IScatterGatherDefinition>)
Adds a scatter-gather step configured via a builder callback.
IRouteDefinition ScatterGather(Action<IScatterGatherDefinition> configure)
ScatterGather(Func<IExchange, IExchange, IExchange>, params string[])
Adds a scatter-gather step with static recipients and the specified aggregation strategy.
IRouteDefinition ScatterGather(Func<IExchange, IExchange, IExchange> aggregationStrategy, params string[] recipients)
SetBody(Func<IExchange, object?>)
Sets the exchange body using a factory.
IRouteDefinition SetBody(Func<IExchange, object?> factory)
SetBody(IExpression)
Sets the exchange body using an . A ${...} template is one:
IRouteDefinition SetBody(IExpression expression)
SetHeader(string, Func<IExchange, object?>)
Sets a header using a factory.
IRouteDefinition SetHeader(string key, Func<IExchange, object?> factory)
SetHeader(string, IExpression)
Sets a header using an ; a ${...} template is one:
IRouteDefinition SetHeader(string name, IExpression expression)
SetHeader(string, object?)
Sets a header to a static value.
IRouteDefinition SetHeader(string key, object? value)
SetHeaders(params (string Name, object? Value)[])
Sets several headers in one step; an or Func<IExchange, object?> value is evaluated per message, anything else is a constant.
IRouteDefinition SetHeaders(params (string Name, object? Value)[] headers)
SetProperties(params (string Name, object? Value)[])
Sets several exchange properties in one step, in order; an or Func<IExchange, object?> value is evaluated per message, anything else is a constant.
IRouteDefinition SetProperties(params (string Name, object? Value)[] properties)
SetProperty(string, Func<IExchange, object?>)
Sets a property using a factory.
IRouteDefinition SetProperty(string key, Func<IExchange, object?> factory)
SetProperty(string, IExpression)
Sets a property using an ; a ${...} template is one:
IRouteDefinition SetProperty(string key, IExpression expression)
SetProperty(string, object?)
Sets a property to a static value.
IRouteDefinition SetProperty(string key, object? value)
Sort(string, string?, bool)
Sorts the collection selected by a route-language expression and puts the sorted list into the body; the key expression sees each element as body (Sor...
IRouteDefinition Sort(string collectionExpression, string? keyExpression = null, bool descending = false)
Sort<T>(Func<IExchange, IEnumerable<T>>, Func<T, object?>?, bool, IComparer<object?>?)
Sorts a typed collection selected from the exchange; the body becomes a List<T>.
IRouteDefinition Sort<T>(Func<IExchange, IEnumerable<T>> source, Func<T, object?>? key = null, bool descending = false, IComparer<object?>? comparer = null)
SpanTag(string, IExpression, SpanTarget)
Puts the attribute key on a span of the engine, its value evaluated per message — the way to
IRouteDefinition SpanTag(string key, IExpression value, SpanTarget target = SpanTarget.Enclosing)
SpanTag(string, string, SpanTarget)
Puts the attribute key = value (a literal) on a span of the engine, so the
IRouteDefinition SpanTag(string key, string value, SpanTarget target = SpanTarget.Enclosing)
Split(Func<IExchange, IAsyncEnumerable<object?>>)
Opens a streaming Split scope backed by an async enumerable (no parallel / aggregation).
SplitDefinition Split(Func<IExchange, IAsyncEnumerable<object?>> splitter)
Split(Func<IExchange, IEnumerable<object?>>)
Opens a Split scope. The splitter function splits the exchange body into parts;
SplitDefinition Split(Func<IExchange, IEnumerable<object?>> splitter)
Split(IExpression)
Opens a Split scope using an expression to produce the split parts.
SplitDefinition Split(IExpression expression)
StreamCaching(long?)
Wraps a forward-only body with a seekable cache so
IRouteDefinition StreamCaching(long? spoolThreshold = null)
Threads(int)
Opens a Threads scope (Camel-style concurrency handoff). The child pipeline runs on a bounded
ThreadsDefinition Threads(int poolSize)
Throttle(Func<IExchange, int>)
Opens a Throttle scope whose limit is computed per exchange: the factory runs on every
ThrottleDefinition Throttle(Func<IExchange, int> maxPerPeriodFactory)
Throttle(Func<IExchange, string>, Func<IExchange, int>, TimeSpan?)
Keyed Throttle whose limit is read from each message as well as its key: "gold customers 100
KeyedThrottleDefinition Throttle(Func<IExchange, string> keyExtractor, Func<IExchange, int> maxPerPeriodFactory, TimeSpan? period = null)
Throttle(Func<IExchange, string>, int, TimeSpan?)
Opens a keyed Throttle scope that limits throughput per unique key extracted from the exchange.
KeyedThrottleDefinition Throttle(Func<IExchange, string> keyExtractor, int maxPerPeriod, TimeSpan? period = null)
Throttle(int)
Opens a Throttle scope that limits exchange throughput to maxPerPeriod
ThrottleDefinition Throttle(int maxPerPeriod)
Throttle(string, string, TimeSpan?)
Keyed Throttle from two route-language expressions: the key ("header.customerId") and the
KeyedThrottleDefinition Throttle(string keyExpression, string maxPerPeriodExpression, TimeSpan? period = null)
Throttle(string, TimeSpan?)
Throttle whose per-period limit is a route-language expression evaluated per message ("${header.rate}", "header.tier == 'gold' ? 100 : 10").
ThrottleDefinition Throttle(string maxPerPeriodExpression, TimeSpan? period = null)
ThrowException(Exception)
Throws a specific pre-built exception instance.
IRouteDefinition ThrowException(Exception exception)
ThrowException(string)
Throws a new exception with the given message.
IRouteDefinition ThrowException(string message)
ThrowException(Type, string)
Instantiates and throws an exception by type and message.
IRouteDefinition ThrowException(Type exceptionType, string message)
ThrowException<TException>(string?)
Instantiates and throws a typed exception.
IRouteDefinition ThrowException<TException>(string? message = null) where TException : Exception, new()
ToD(Func<IExchange, string>)
Camel-style dynamic-to using a delegate that yields the URI per exchange.
IRouteDefinition ToD(Func<IExchange, string> uriFactory)
ToD(IExpression)
Camel-style dynamic-to using an that yields the URI.
IRouteDefinition ToD(IExpression uriExpression)
ToD(string)
Camel-style dynamic-to: sends the exchange to an endpoint URI computed
IRouteDefinition ToD(string uriTemplate)
Traced(string, Action<IExchange>)
Inline tracing — wraps a single synchronous action in an Activity span named operationName.
IRouteDefinition Traced(string operationName, Action<IExchange> action)
Traced(string, Func<IExchange, CancellationToken, Task>)
Inline tracing — wraps an asynchronous action in an Activity span named operationName.
IRouteDefinition Traced(string operationName, Func<IExchange, CancellationToken, Task> action)
Traced(string, IProcessor)
Inline tracing — wraps an in an Activity span named operationName.
IRouteDefinition Traced(string operationName, IProcessor processor)
Traced(string)
Opens a tracing scope. All child steps run inside a single Activity span named operationName.
TracedDefinition Traced(string operationName)
Tracing(bool)
Apache Camel parity: enable/disable OpenTelemetry tracing for this route, overriding
IRouteDefinition Tracing(bool value = true)
Transaction(TransactionPolicy?)
Opens a declarative transaction scope. All child steps execute inside a
TransactionDefinition Transaction(TransactionPolicy? policy = null)
Transform(Func<IExchange, object?>)
Transforms the exchange body using a factory.
IRouteDefinition Transform(Func<IExchange, object?> transform)
Transform(IExpression)
Transforms the exchange body using an .
IRouteDefinition Transform(IExpression expression)
TryCatch()
Opens a TryCatch scope. Build the try body with leaf methods,
TryCatchDefinition TryCatch()
Unmarshal(IMessageSerializer, Type)
Unmarshals the body to targetType with a configured serializer instance.
IRouteDefinition Unmarshal(IMessageSerializer serializer, Type targetType)
Unmarshal(string, Type)
Unmarshals the body to targetType with the data format registered for contentType.
IRouteDefinition Unmarshal(string contentType, Type targetType)
Unmarshal(Type, Type)
Unmarshals (deserializes) the exchange body to targetType using the specified serializer type.
IRouteDefinition Unmarshal(Type serializerType, Type targetType)
Unmarshal<T>()
Apache Camel parity: unmarshal the body to T using the data format
IRouteDefinition Unmarshal<T>()
Unmarshal<T>(IMessageSerializer)
Unmarshals the body to T with a configured serializer instance.
IRouteDefinition Unmarshal<T>(IMessageSerializer serializer)
Unmarshal<T>(string)
Unmarshals the body to T with the data format registered for contentType.
IRouteDefinition Unmarshal<T>(string contentType)
Unmarshal<TSerializer, TTarget>()
Unmarshals (deserializes) the exchange body using the specified serializer and target types.
IRouteDefinition Unmarshal<TSerializer, TTarget>() where TSerializer : class
Validate(Func<IExchange, bool>, string, bool)
Validates the exchange using a predicate function.
IRouteDefinition Validate(Func<IExchange, bool> predicate, string errorMessage = "Validation failed", bool throwOnFailure = true)
Validate(IExpression, string, bool)
Validates the exchange against an expression read as a condition, as Filter and When read one:
IRouteDefinition Validate(IExpression condition, string errorMessage = "Validation failed", bool throwOnFailure = true)
Validate(IMessageValidator, bool)
Validates the exchange using the provided instance.
IRouteDefinition Validate(IMessageValidator validator, bool throwOnFailure = true)
Validate(IPredicate, string, bool)
Validates the exchange against an .
IRouteDefinition Validate(IPredicate predicate, string errorMessage = "Validation failed", bool throwOnFailure = true)
ValidateJsonSchema(JsonSchema, bool)
Validates the exchange body against a pre-parsed .
IRouteDefinition ValidateJsonSchema(JsonSchema schema, bool throwOnFailure = true)
ValidateJsonSchema(string, bool)
Validates the exchange body against a JSON Schema provided as a string.
IRouteDefinition ValidateJsonSchema(string schemaJson, bool throwOnFailure = true)
ValidateXsd(string, bool)
Validates the exchange body against an XSD schema string.
IRouteDefinition ValidateXsd(string xsdContent, bool throwOnFailure = true)
ValidateXsd(string?, string, bool)
Validates the exchange body against an XSD schema string with an explicit target namespace.
IRouteDefinition ValidateXsd(string? targetNamespace, string xsdContent, bool throwOnFailure = true)
ValidateXsd(XmlSchemaSet, bool)
Validates the exchange body against a pre-built .
IRouteDefinition ValidateXsd(XmlSchemaSet schemaSet, bool throwOnFailure = true)
ValidateXsdFile(string, string?, string?, bool)
Validates the exchange body against an XSD file whose xs:import and xs:include are read relative
IRouteDefinition ValidateXsdFile(string schemaPath, string? targetNamespace = null, string? schemaRoot = null, bool throwOnFailure = true)
WireTap(Func<IExchange, string>, Action<IExchange>, Func<IExchange, object?>, string?)
Dynamic-URI wire-tap with both an onPrepare callback and a body factory.
IRouteDefinition WireTap(Func<IExchange, string> uriFactory, Action<IExchange> onPrepare, Func<IExchange, object?> newBodyFactory, string? executorService = null)
WireTap(Func<IExchange, string>, Action<IExchange>, string?)
Dynamic-URI wire-tap with an onPrepare callback.
IRouteDefinition WireTap(Func<IExchange, string> uriFactory, Action<IExchange> onPrepare, string? executorService = null)
WireTap(Func<IExchange, string>, Func<IExchange, object?>, string?)
Dynamic-URI wire-tap with a body replacement factory.
IRouteDefinition WireTap(Func<IExchange, string> uriFactory, Func<IExchange, object?> newBodyFactory, string? executorService = null)
WireTap(Func<IExchange, string>, string?)
Wire-tap to a dynamic URI computed per message from a factory.
IRouteDefinition WireTap(Func<IExchange, string> uriFactory, string? executorService = null)
WireTap(string, Action<IExchange>, Func<IExchange, object?>, string?)
Sends a wire-tap copy to a URI with both an onPrepare callback and a body replacement factory.
IRouteDefinition WireTap(string uri, Action<IExchange> onPrepare, Func<IExchange, object?> newBodyFactory, string? executorService = null)
WireTap(string, Action<IExchange>, string?)
Sends a wire-tap copy to a URI, calling onPrepare on the clone before dispatching.
IRouteDefinition WireTap(string uri, Action<IExchange> onPrepare, string? executorService = null)
WireTap(string, Func<IExchange, object?>, string?)
Sends a wire-tap copy to a URI, replacing the clone's body with the result of newBodyFactory.
IRouteDefinition WireTap(string uri, Func<IExchange, object?> newBodyFactory, string? executorService = null)
WireTap(string, string?)
Sends a copy of the exchange to a URI and continues (wire tap). The copy runs on the tap's own bounded pool;
IRouteDefinition WireTap(string uri, string? executorService = null)
Xslt(string, XsltOutput, bool, bool)
Apache Camel xslt: parity: transform the body through an XSLT stylesheet file.
IRouteDefinition Xslt(string stylesheetPath, XsltOutput output = XsltOutput.String, bool failOnNullBody = true, bool allowTemplateFromHeader = false)
XsltContent(string, XsltOutput, bool, bool)
Transform the body through an inline XSLT stylesheet document.
IRouteDefinition XsltContent(string stylesheetXml, XsltOutput output = XsltOutput.String, bool failOnNullBody = true, bool allowTemplateFromHeader = false)