pub struct ReceiveOptions {
pub max_messages: u32,
pub timeout: Duration,
pub session_id: Option<SessionId>,
pub accept_any_session: bool,
pub lock_duration: Option<Duration>,
pub peek_only: bool,
pub from_sequence_number: Option<u64>,
}Expand description
Configuration options for receiving messages from queues
Fields§
§max_messages: u32Maximum number of messages to receive in a batch
timeout: DurationTimeout duration for receive operations
session_id: Option<SessionId>Session ID for session-specific message consumption
accept_any_session: boolWhether to accept any available session
lock_duration: Option<Duration>Message lock duration for processing time management
peek_only: boolPeek-only mode for message inspection without consumption
from_sequence_number: Option<u64>Sequence number for replay and recovery scenarios
Implementations§
Source§impl ReceiveOptions
impl ReceiveOptions
Sourcepub fn with_max_messages(self, max: u32) -> Self
pub fn with_max_messages(self, max: u32) -> Self
Set maximum number of messages to receive
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set timeout duration
Sourcepub fn with_session_id(self, session_id: SessionId) -> Self
pub fn with_session_id(self, session_id: SessionId) -> Self
Set specific session ID to consume from
Sourcepub fn accept_any_session(self) -> Self
pub fn accept_any_session(self) -> Self
Accept messages from any available session
Sourcepub fn with_lock_duration(self, duration: Duration) -> Self
pub fn with_lock_duration(self, duration: Duration) -> Self
Set message lock duration
Sourcepub fn from_sequence_number(self, sequence: u64) -> Self
pub fn from_sequence_number(self, sequence: u64) -> Self
Set starting sequence number for replay
Trait Implementations§
Source§impl Clone for ReceiveOptions
impl Clone for ReceiveOptions
Source§fn clone(&self) -> ReceiveOptions
fn clone(&self) -> ReceiveOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReceiveOptions
impl Debug for ReceiveOptions
Auto Trait Implementations§
impl Freeze for ReceiveOptions
impl RefUnwindSafe for ReceiveOptions
impl Send for ReceiveOptions
impl Sync for ReceiveOptions
impl Unpin for ReceiveOptions
impl UnsafeUnpin for ReceiveOptions
impl UnwindSafe for ReceiveOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more