pub trait DMSCQueueConsumer: Send + Sync {
// Required methods
fn receive<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DMSCResult<Option<DMSCQueueMessage>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn ack<'life0, 'life1, 'async_trait>(
&'life0 self,
message_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn nack<'life0, 'life1, 'async_trait>(
&'life0 self,
message_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn pause<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn resume<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn receive_multi<'life0, 'async_trait>(
&'life0 self,
count: usize,
) -> Pin<Box<dyn Future<Output = DMSCResult<Vec<Option<DMSCQueueMessage>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn ack_multi<'life0, 'life1, 'async_trait>(
&'life0 self,
message_ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Trait for consuming messages from queues.
This trait defines the interface for receiving and acknowledging messages from queues.
Required Methods§
Sourcefn receive<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DMSCResult<Option<DMSCQueueMessage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn receive<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DMSCResult<Option<DMSCQueueMessage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Receives a message from the queue.
§Returns
A DMSCResult<Option<DMSCQueueMessage>> containing the message if available, or None if no message is available