pub struct SplitterService { /* private fields */ }Expand description
Tower Service implementing the Splitter EIP.
Splits an incoming exchange into fragments via a configurable expression, processes each fragment through a sub-pipeline, and aggregates the results.
DoS bound (R3-M4): the eager splitter materializes the whole fragment
Vec before processing. SplitterConfig::max_fragments (default 100_000)
rejects a split that would explode memory. For unbounded or lazy byte-stream
input, prefer StreamingSplitterService, which processes fragments as they
arrive and never materializes the full set.
Note: In parallel mode, stop_on_exception only affects the aggregation
phase. All spawned fragments run to completion because join_all cannot
cancel in-flight futures. Sequential mode stops processing immediately.
Implementations§
Source§impl SplitterService
impl SplitterService
Sourcepub fn new(
config: SplitterConfig,
sub_pipeline: BoxProcessor,
) -> Result<Self, CamelError>
pub fn new( config: SplitterConfig, sub_pipeline: BoxProcessor, ) -> Result<Self, CamelError>
Create a new SplitterService from a SplitterConfig and a sub-pipeline.
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Check whether the splitter has been cancelled.
Trait Implementations§
Source§impl Clone for SplitterService
impl Clone for SplitterService
Source§fn clone(&self) -> SplitterService
fn clone(&self) -> SplitterService
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Service<Exchange> for SplitterService
impl Service<Exchange> for SplitterService
Source§type Error = CamelError
type Error = CamelError
Source§type Future = Pin<Box<dyn Future<Output = Result<Exchange, CamelError>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<Exchange, CamelError>> + Send>>
Auto Trait Implementations§
impl !RefUnwindSafe for SplitterService
impl !Sync for SplitterService
impl !UnwindSafe for SplitterService
impl Freeze for SplitterService
impl Send for SplitterService
impl Unpin for SplitterService
impl UnsafeUnpin for SplitterService
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T, Request> ServiceExt<Request> for T
impl<T, Request> ServiceExt<Request> for T
Source§fn ready(&mut self) -> Ready<'_, Self, Request>where
Self: Sized,
fn ready(&mut self) -> Ready<'_, Self, Request>where
Self: Sized,
Source§fn ready_oneshot(self) -> ReadyOneshot<Self, Request>where
Self: Sized,
fn ready_oneshot(self) -> ReadyOneshot<Self, Request>where
Self: Sized,
Source§fn oneshot(self, req: Request) -> Oneshot<Self, Request>where
Self: Sized,
fn oneshot(self, req: Request) -> Oneshot<Self, Request>where
Self: Sized,
Service, calling it with the provided request once it is ready.Source§fn and_then<F>(self, f: F) -> AndThen<Self, F>
fn and_then<F>(self, f: F) -> AndThen<Self, F>
poll_ready method. Read moreSource§fn map_response<F, Response>(self, f: F) -> MapResponse<Self, F>
fn map_response<F, Response>(self, f: F) -> MapResponse<Self, F>
poll_ready method. Read moreSource§fn map_err<F, Error>(self, f: F) -> MapErr<Self, F>
fn map_err<F, Error>(self, f: F) -> MapErr<Self, F>
poll_ready method. Read moreSource§fn map_result<F, Response, Error>(self, f: F) -> MapResult<Self, F>
fn map_result<F, Response, Error>(self, f: F) -> MapResult<Self, F>
Result<Self::Response, Self::Error>)
to a different value, regardless of whether the future succeeds or
fails. Read more