pub struct MulticastService { /* private fields */ }Expand description
Tower Service implementing the Multicast EIP.
DoS bound (R3-L4): fan-out is bounded by the static endpoint list
(operator-configured at route build, not attacker-controlled). In parallel
mode, parallel_limit defaults to endpoints.len() so the code path always
carries an explicit concurrency bound.
Sends a message to multiple endpoints, processing each independently, and then aggregating the results.
Supports both sequential and parallel processing modes, configurable
via MulticastConfig::parallel. When parallel mode is enabled,
all endpoints are invoked concurrently with optional concurrency
limiting via MulticastConfig::parallel_limit.
Implementations§
Source§impl MulticastService
impl MulticastService
Sourcepub fn new(
endpoints: Vec<BoxProcessor>,
config: MulticastConfig,
) -> Result<Self, CamelError>
pub fn new( endpoints: Vec<BoxProcessor>, config: MulticastConfig, ) -> Result<Self, CamelError>
Create a new MulticastService from a list of endpoints and a MulticastConfig.
Sourcepub fn config(&self) -> &MulticastConfig
pub fn config(&self) -> &MulticastConfig
Borrow the effective config (post-normalization).
Trait Implementations§
Source§impl Clone for MulticastService
impl Clone for MulticastService
Source§fn clone(&self) -> MulticastService
fn clone(&self) -> MulticastService
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 MulticastService
impl Service<Exchange> for MulticastService
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 MulticastService
impl !Sync for MulticastService
impl !UnwindSafe for MulticastService
impl Freeze for MulticastService
impl Send for MulticastService
impl Unpin for MulticastService
impl UnsafeUnpin for MulticastService
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