pub struct JmsBridgePool { /* private fields */ }Implementations§
Source§impl JmsBridgePool
impl JmsBridgePool
pub fn from_config(pool_config: JmsPoolConfig) -> Result<Self, CamelError>
Sourcepub fn resolve_broker_name(
&self,
name: Option<&str>,
) -> Result<String, CamelError>
pub fn resolve_broker_name( &self, name: Option<&str>, ) -> Result<String, CamelError>
Resolve broker name from the URI broker= param.
- If
Some(name)→ validate it exists in config and return it. - If
Noneand exactly one broker is configured → use it implicitly. - If
Noneand multiple brokers are configured → error asking for?broker=. - If
Noneand no brokers are configured → error asking to declare brokers.
Sourcepub fn resolve_broker_type(&self, scheme: &str, broker_name: &str) -> BrokerType
pub fn resolve_broker_type(&self, scheme: &str, broker_name: &str) -> BrokerType
Resolve broker type: activemq/artemis schemes hard-override config type; jms uses config.
Sourcepub async fn get_or_create_slot(
&self,
broker_name: &str,
) -> Result<Arc<BridgeSlot>, CamelError>
pub async fn get_or_create_slot( &self, broker_name: &str, ) -> Result<Arc<BridgeSlot>, CamelError>
Get or create a BridgeSlot for the given broker name. If the slot doesn’t exist, starts the bridge process and spawns the health monitor.
Sourcepub fn restart_slot(&self, broker_name: &str)
pub fn restart_slot(&self, broker_name: &str)
Signal a slot to restart (called by producers on transport errors).
Sourcepub async fn refresh_slot_channel(
&self,
broker_name: &str,
) -> Result<(), CamelError>
pub async fn refresh_slot_channel( &self, broker_name: &str, ) -> Result<(), CamelError>
Recreate the tonic channel for an existing running bridge process.
Useful when a channel becomes stale after transport-level failures while the underlying bridge process is still alive.
pub fn begin_shutdown(&self)
Sourcepub async fn shutdown(&self) -> Result<(), CamelError>
pub async fn shutdown(&self) -> Result<(), CamelError>
Shutdown all slots: stop all bridge processes and await health monitors.
Auto Trait Implementations§
impl !Freeze for JmsBridgePool
impl !RefUnwindSafe for JmsBridgePool
impl !UnwindSafe for JmsBridgePool
impl Send for JmsBridgePool
impl Sync for JmsBridgePool
impl Unpin for JmsBridgePool
impl UnsafeUnpin for JmsBridgePool
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request