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§
Sourcefn 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_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
Sourcefn 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_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)
Sourcefn 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_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)
Sourcefn 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_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
Sourcefn 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 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