Skip to main content

InlineRouteDispatcher

Trait InlineRouteDispatcher 

Source
pub trait InlineRouteDispatcher:
    Send
    + Sync
    + 'static {
    // Required method
    fn dispatch(
        &self,
        exchange: Exchange,
    ) -> Pin<Box<dyn Future<Output = Result<Exchange, CamelError>> + Send + 'static>>;
}
Expand description

Opaque capability for dispatching an Exchange directly into a route pipeline (request-reply), bypassing the consumer submission channel.

Set once by the camel-core runtime before the consumer starts, via ConsumerContext::set_inline_dispatcher. The trait exposes ONLY dispatch — no pipeline or processor accessors — so domain components stay framework-agnostic.

Required Methods§

Source

fn dispatch( &self, exchange: Exchange, ) -> Pin<Box<dyn Future<Output = Result<Exchange, CamelError>> + Send + 'static>>

Run exchange through the route pipeline and resolve with the processed exchange, or with the pipeline error if no error handler absorbed it.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§