Class ThreadsDefinition

Assembly: redb.Route.dll

Scope-opener definition for the Threads EIP (Camel-style concurrency stage).
Wraps the child pipeline () and runs it on a bounded pool
of poolSize persistent workers via , so a serial polling
consumer can process up to poolSize exchanges concurrently.
Inherits the leaf DSL from ; close with .

Adaptive by exchange pattern: InOnly is a fire-and-forget hand-off (the exchange is cloned and
run on the worker pool — a transaction boundary, like .To("seda://")); InOut runs the
body inline on the same exchange under a SemaphoreSlim gate (≤ poolSize concurrent), so
the reply — on Out or In — is preserved losslessly and request/reply works across it
(InOut is NOT a transaction boundary — the ambient transaction flows into the inline body).
Ordering is not preserved when poolSize > 1.

public class ThreadsDefinition : RouteDefinitionBase<ThreadsDefinition>, IRouteDefinition, IProcessorDefinition, IRouteScope

Inheritance

Implements

Inherited Members

Methods

CreateProcessor(IRouteContext)

Compile this node into a runtime processor.

public override IProcessor CreateProcessor(IRouteContext context)

End()

Closes this scope and returns the parent .

public IRouteDefinition End()

EndThreads()

Closes this threads scope and returns the parent route definition.

public IRouteDefinition EndThreads()

EnqueueTimeout(TimeSpan)

Bounds how long a caller waits for a free worker slot when the pool + queue are saturated.

public ThreadsDefinition EnqueueTimeout(TimeSpan value)

MaxQueueSize(int)

Sets the bounded hand-off queue capacity (backpressure). 0 = default (== pool size).

public ThreadsDefinition MaxQueueSize(int value)