pub trait MessageHandler<T>:
Send
+ Sync
+ 'static{
// Required method
fn handle<'life0, 'async_trait>(
&'life0 self,
message: T,
context: MessageContext,
) -> Pin<Box<dyn Future<Output = MessageResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Message handler trait for processing consumed messages (legacy, prefer BaseConsumer)
Required Methods§
Sourcefn handle<'life0, 'async_trait>(
&'life0 self,
message: T,
context: MessageContext,
) -> Pin<Box<dyn Future<Output = MessageResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle<'life0, 'async_trait>(
&'life0 self,
message: T,
context: MessageContext,
) -> Pin<Box<dyn Future<Output = MessageResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle a received message