pub struct SendOptions {
pub lane: MessageLane,
pub priority: Priority,
pub enqueue_timeout: Option<Duration>,
pub write_timeout: Duration,
pub deadline: Option<Instant>,
pub retry: SendRetryPolicy,
pub disconnected: DisconnectedPolicy,
pub cancellation: Option<CancellationGroup>,
pub metadata: Metadata,
}Expand description
Scheduling, cancellation, retry, and per-stage deadline configuration for one outbound message.
Fields§
§lane: MessageLaneThe normal or emergency sending channel used by the message. The default is the normal channel.
priority: PriorityThe scheduling priority within the normal channel; the emergency channel only accepts Normal.
enqueue_timeout: Option<Duration>Maximum time from the builder’s first admission attempt until queue
resources are acquired; None imposes no separate admission limit.
Repeated admission attempts for the same builder use the original start
point, while the overall deadline remains in force.
write_timeout: DurationThe overall time limit for each actual write attempt, covering all shards of the message, defaults to 10 seconds.
deadline: Option<Instant>The original absolute deadline covering all stages, including queuing and reconnection waiting; None means there is no overall deadline.
retry: SendRetryPolicyRetry permission after delivery failure; no retry by default. When retrying is allowed, the application must ensure the safety of repeated delivery.
disconnected: DisconnectedPolicyHow to handle cases where the connection is not connected during admission or the connection is interrupted during waiting. The default is to reject the request.
cancellation: Option<CancellationGroup>A cancellation group that can uniformly cancel a group of operations; None means not to join the cancellation group.
metadata: MetadataLocal application metadata attached to the send operation; it is not automatically added to the wire message payload.