pub struct StreamSplitBuilder { /* private fields */ }Expand description
Builder for the sub-pipeline within a .stream_split() … .end_stream_split()
block.
The caller supplies the streaming fragment expression directly; sub-steps
added here run once per fragment. Calling .end_stream_split() packages
the sub-steps into a BuilderStep::StreamSplit and returns the parent
RouteBuilder.
Implementations§
Source§impl StreamSplitBuilder
impl StreamSplitBuilder
Sourcepub fn aggregation(self, strategy: AggregationStrategy) -> Self
pub fn aggregation(self, strategy: AggregationStrategy) -> Self
Set the aggregation strategy applied to fragment results.
Sourcepub fn stop_on_exception(self, stop: bool) -> Self
pub fn stop_on_exception(self, stop: bool) -> Self
Set whether the first fragment error stops the split. Defaults to true.
Sourcepub fn end_stream_split(self) -> RouteBuilder
pub fn end_stream_split(self) -> RouteBuilder
Close the stream-split scope. Packages the accumulated sub-steps into a
BuilderStep::StreamSplit and returns the parent RouteBuilder.
Trait Implementations§
Source§impl StepAccumulator for StreamSplitBuilder
impl StepAccumulator for StreamSplitBuilder
fn steps_mut(&mut self) -> &mut Vec<BuilderStep>
fn to(self, endpoint: impl Into<String>) -> Self
fn process<F, Fut>(self, f: F) -> Self
fn process_fn(self, processor: BoxProcessor) -> Self
fn set_header(self, key: impl Into<String>, value: impl Into<Value>) -> Self
fn map_body<F>(self, mapper: F) -> Self
fn set_body<B>(self, body: B) -> Self
fn set_body_fn<F>(self, expr: F) -> Self
fn set_header_fn<F>(self, key: impl Into<String>, expr: F) -> Self
fn aggregate(self, config: AggregatorConfig) -> Self
Source§fn stop(self) -> Self
fn stop(self) -> Self
Stop processing this exchange immediately. No further steps in the
current pipeline will run. Read more
fn delay(self, duration: Duration) -> Self
fn delay_with_header( self, duration: Duration, header: impl Into<String>, ) -> Self
Source§fn log(self, message: impl Into<String>, level: LogLevel) -> Self
fn log(self, message: impl Into<String>, level: LogLevel) -> Self
Log a message at the specified level. Read more
Source§fn convert_body_to(self, target: BodyType) -> Self
fn convert_body_to(self, target: BodyType) -> Self
Convert the message body to the target type. Read more
fn stream_cache(self, threshold: usize) -> Self
Source§fn stream_cache_default(self) -> Self
fn stream_cache_default(self) -> Self
Source§fn marshal(self, format: impl Into<String>) -> Result<Self, CamelError>
fn marshal(self, format: impl Into<String>) -> Result<Self, CamelError>
Marshal the message body using the specified data format. Read more
Source§fn unmarshal(self, format: impl Into<String>) -> Result<Self, CamelError>
fn unmarshal(self, format: impl Into<String>) -> Result<Self, CamelError>
Unmarshal the message body using the specified data format. Read more
Source§fn validate(self, expression: impl Into<String>) -> Self
fn validate(self, expression: impl Into<String>) -> Self
Validate the exchange using a predicate expression. Read more
Source§fn script(self, language: impl Into<String>, script: impl Into<String>) -> Self
fn script(self, language: impl Into<String>, script: impl Into<String>) -> Self
Execute a script that can modify the exchange (headers, properties, body). Read more
Source§fn enrich(self, uri: impl Into<String>) -> Self
fn enrich(self, uri: impl Into<String>) -> Self
EIP-7 enrich: synchronous content enrichment via a resolved producer. Read more
Source§fn poll_enrich(self, uri: impl Into<String>, timeout_ms: u64) -> Self
fn poll_enrich(self, uri: impl Into<String>, timeout_ms: u64) -> Self
EIP-7 pollEnrich: blocking poll of a PollingConsumer with timeout. Read more
fn bean(self, name: impl Into<String>, method: impl Into<String>) -> Self
Source§fn to_layered(
self,
uri: impl Into<String>,
layer: impl ProcessorLayer + 'static,
) -> Self
fn to_layered( self, uri: impl Into<String>, layer: impl ProcessorLayer + 'static, ) -> Self
Send to
uri through a Tower middleware layer. Read moreSource§fn layered(
self,
layer: impl ProcessorLayer + 'static,
section: impl FnOnce(SectionBuilder) -> SectionBuilder,
) -> Self
fn layered( self, layer: impl ProcessorLayer + 'static, section: impl FnOnce(SectionBuilder) -> SectionBuilder, ) -> Self
Wrap a nested sub-pipeline in a Tower middleware layer. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for StreamSplitBuilder
impl !UnwindSafe for StreamSplitBuilder
impl Forget for StreamSplitBuilder
impl Freeze for StreamSplitBuilder
impl Send for StreamSplitBuilder
impl Sync for StreamSplitBuilder
impl Unpin for StreamSplitBuilder
impl UnsafeUnpin for StreamSplitBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more