DMSCQueue

Trait DMSCQueue 

Source
pub trait DMSCQueue: Send + Sync {
    // Required methods
    fn create_producer<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = DMSCResult<Box<dyn DMSCQueueProducer>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn create_consumer<'life0, 'life1, 'async_trait>(
        &'life0 self,
        consumer_group: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = DMSCResult<Box<dyn DMSCQueueConsumer>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_stats<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = DMSCResult<DMSCQueueStats>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn purge<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Main queue trait defining queue operations.

This trait defines the core operations for queues, including creating producers and consumers, getting statistics, purging queues, and deleting queues.

Required Methods§

Source

fn create_producer<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = DMSCResult<Box<dyn DMSCQueueProducer>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Creates a new producer for this queue.

§Returns

A DMSCResult<Box<dyn DMSCQueueProducer>> containing the producer

Source

fn create_consumer<'life0, 'life1, 'async_trait>( &'life0 self, consumer_group: &'life1 str, ) -> Pin<Box<dyn Future<Output = DMSCResult<Box<dyn DMSCQueueConsumer>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Creates a new consumer for this queue with the given consumer group.

§Parameters
  • consumer_group: The name of the consumer group
§Returns

A DMSCResult<Box<dyn DMSCQueueConsumer>> containing the consumer

Source

fn get_stats<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = DMSCResult<DMSCQueueStats>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Gets statistics for this queue.

§Returns

A DMSCResult<DMSCQueueStats> containing the queue statistics

Source

fn purge<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Purges all messages from this queue.

§Returns

A DMSCResult<()> indicating success or failure

Source

fn delete<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Deletes this queue.

§Returns

A DMSCResult<()> indicating success or failure

Implementors§