pub struct SendOptions {
pub session_id: Option<SessionId>,
pub correlation_id: Option<String>,
pub scheduled_enqueue_time: Option<Timestamp>,
pub time_to_live: Option<Duration>,
pub properties: HashMap<String, String>,
pub content_type: Option<String>,
pub duplicate_detection_id: Option<String>,
}Expand description
Configuration options for sending messages to queues
Fields§
§session_id: Option<SessionId>Session ID for ordered processing workflows
correlation_id: Option<String>Correlation ID for request/response and tracing patterns
scheduled_enqueue_time: Option<Timestamp>Scheduled delivery time for delayed message processing
time_to_live: Option<Duration>Time-to-live for automatic message expiration
properties: HashMap<String, String>Custom properties for metadata and routing information
content_type: Option<String>Content type override for specialized message formats
duplicate_detection_id: Option<String>Duplicate detection ID for exactly-once delivery guarantees
Implementations§
Source§impl SendOptions
impl SendOptions
Sourcepub fn with_session_id(self, session_id: SessionId) -> Self
pub fn with_session_id(self, session_id: SessionId) -> Self
Set session ID for ordered processing
Sourcepub fn with_correlation_id(self, correlation_id: String) -> Self
pub fn with_correlation_id(self, correlation_id: String) -> Self
Set correlation ID for tracing
Sourcepub fn with_scheduled_enqueue_time(self, time: Timestamp) -> Self
pub fn with_scheduled_enqueue_time(self, time: Timestamp) -> Self
Set scheduled delivery time
Sourcepub fn with_delay(self, delay: Duration) -> Self
pub fn with_delay(self, delay: Duration) -> Self
Set scheduled delivery with a delay from now
Sourcepub fn with_time_to_live(self, ttl: Duration) -> Self
pub fn with_time_to_live(self, ttl: Duration) -> Self
Set time-to-live for message expiration
Sourcepub fn with_property(self, key: String, value: String) -> Self
pub fn with_property(self, key: String, value: String) -> Self
Add a custom property
Sourcepub fn with_content_type(self, content_type: String) -> Self
pub fn with_content_type(self, content_type: String) -> Self
Set content type
Sourcepub fn with_duplicate_detection_id(self, id: String) -> Self
pub fn with_duplicate_detection_id(self, id: String) -> Self
Set duplicate detection ID
Trait Implementations§
Source§impl Clone for SendOptions
impl Clone for SendOptions
Source§fn clone(&self) -> SendOptions
fn clone(&self) -> SendOptions
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 SendOptions
impl Debug for SendOptions
Source§impl Default for SendOptions
impl Default for SendOptions
Source§fn default() -> SendOptions
fn default() -> SendOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SendOptions
impl RefUnwindSafe for SendOptions
impl Send for SendOptions
impl Sync for SendOptions
impl Unpin for SendOptions
impl UnsafeUnpin for SendOptions
impl UnwindSafe for SendOptions
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