Skip to main content

PgmqNotifyEmitter

Trait PgmqNotifyEmitter 

Source
pub trait PgmqNotifyEmitter: Send + Sync {
    // Required methods
    fn emit_queue_created<'life0, 'async_trait>(
        &'life0 self,
        event: QueueCreatedEvent,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn emit_message_ready<'life0, 'async_trait>(
        &'life0 self,
        event: MessageReadyEvent,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn emit_message_with_payload<'life0, 'async_trait>(
        &'life0 self,
        event: MessageWithPayloadEvent,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn emit_batch_ready<'life0, 'async_trait>(
        &'life0 self,
        event: BatchReadyEvent,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn emit_event<'life0, 'async_trait>(
        &'life0 self,
        event: PgmqNotifyEvent,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn is_healthy<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait for emitting PGMQ notifications

Required Methods§

Source

fn emit_queue_created<'life0, 'async_trait>( &'life0 self, event: QueueCreatedEvent, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Emit a queue created event

Source

fn emit_message_ready<'life0, 'async_trait>( &'life0 self, event: MessageReadyEvent, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Emit a message ready event (signal only, for large messages)

Source

fn emit_message_with_payload<'life0, 'async_trait>( &'life0 self, event: MessageWithPayloadEvent, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Emit a message with payload event (TAS-133, for small messages)

Source

fn emit_batch_ready<'life0, 'async_trait>( &'life0 self, event: BatchReadyEvent, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Emit a batch ready event

Source

fn emit_event<'life0, 'async_trait>( &'life0 self, event: PgmqNotifyEvent, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Emit a generic PGMQ event

Source

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

Check if emitter is healthy and can send notifications

Implementors§