pub trait SessionClient: Send + Sync {
// Required methods
fn receive_message<'life0, 'async_trait>(
&'life0 self,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<Option<ReceivedMessage>, QueueError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn complete_message<'life0, 'async_trait>(
&'life0 self,
receipt: ReceiptHandle,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn abandon_message<'life0, 'async_trait>(
&'life0 self,
receipt: ReceiptHandle,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn dead_letter_message<'life0, 'async_trait>(
&'life0 self,
receipt: ReceiptHandle,
reason: String,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn renew_session_lock<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn close_session<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn session_id(&self) -> &SessionId;
fn session_expires_at(&self) -> Timestamp;
}Expand description
Interface for session-based ordered message processing
Required Methods§
Sourcefn receive_message<'life0, 'async_trait>(
&'life0 self,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<Option<ReceivedMessage>, QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn receive_message<'life0, 'async_trait>(
&'life0 self,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<Option<ReceivedMessage>, QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Receive message from session (maintains order)
Sourcefn complete_message<'life0, 'async_trait>(
&'life0 self,
receipt: ReceiptHandle,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn complete_message<'life0, 'async_trait>(
&'life0 self,
receipt: ReceiptHandle,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Complete message in session
Sourcefn abandon_message<'life0, 'async_trait>(
&'life0 self,
receipt: ReceiptHandle,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn abandon_message<'life0, 'async_trait>(
&'life0 self,
receipt: ReceiptHandle,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Abandon message in session
Sourcefn dead_letter_message<'life0, 'async_trait>(
&'life0 self,
receipt: ReceiptHandle,
reason: String,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn dead_letter_message<'life0, 'async_trait>(
&'life0 self,
receipt: ReceiptHandle,
reason: String,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send message to dead letter queue
Sourcefn renew_session_lock<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn renew_session_lock<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Renew session lock to prevent timeout
Sourcefn close_session<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close_session<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Close session and release lock
Sourcefn session_id(&self) -> &SessionId
fn session_id(&self) -> &SessionId
Get session ID
Sourcefn session_expires_at(&self) -> Timestamp
fn session_expires_at(&self) -> Timestamp
Get session expiry time