Skip to main content

Producer

Trait Producer 

Source
pub trait Producer: Transport {
    // Required methods
    fn publish<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        queue: &'life1 str,
        message: Message,
    ) -> Pin<Box<dyn Future<Output = Result<(), BrokerError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn publish_with_routing<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        exchange: &'life1 str,
        routing_key: &'life2 str,
        message: Message,
    ) -> Pin<Box<dyn Future<Output = Result<(), BrokerError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait;
}
Expand description

Producer trait (message publishing)

Required Methods§

Source

fn publish<'life0, 'life1, 'async_trait>( &'life0 mut self, queue: &'life1 str, message: Message, ) -> Pin<Box<dyn Future<Output = Result<(), BrokerError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Publish a message to a queue

Source

fn publish_with_routing<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, exchange: &'life1 str, routing_key: &'life2 str, message: Message, ) -> Pin<Box<dyn Future<Output = Result<(), BrokerError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Publish a message with routing key

Implementors§