general_mq::queue

Trait MessageHandler

Source
pub trait MessageHandler: Send + Sync {
    // Required method
    fn on_message<'life0, 'async_trait>(
        &'life0 self,
        queue: Arc<dyn GmqQueue>,
        msg: Box<dyn Message>,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

The message handler for queues.

Required Methods§

Source

fn on_message<'life0, 'async_trait>( &'life0 self, queue: Arc<dyn GmqQueue>, msg: Box<dyn Message>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Triggered for new incoming Messages.

Implementors§