pub struct SubscribeOptions {
pub max_deliver: Option<i64>,
pub backoff_secs: Vec<u64>,
pub max_ack_pending: Option<i64>,
pub deliver_policy: DeliverPolicy,
pub ack_wait_secs: Option<u64>,
}Expand description
Options for creating subscriptions
Exposes provider-native consumer capabilities. Unsupported options are ignored by providers that don’t support them.
Fields§
§max_deliver: Option<i64>Maximum delivery attempts before giving up (NATS: MaxDeliver)
After this many failed deliveries, the message is dropped or routed to a dead letter queue (if configured).
backoff_secs: Vec<u64>Backoff intervals in seconds between redelivery attempts
NATS: maps to consumer BackOff durations.
Example: vec![1, 5, 30] — retry after 1s, 5s, 30s.
max_ack_pending: Option<i64>Maximum number of unacknowledged messages in flight
Provides backpressure — consumer won’t receive new messages
until pending acks drop below this limit.
NATS: MaxAckPending.
deliver_policy: DeliverPolicyWhere to start consuming from
ack_wait_secs: Option<u64>How long to wait for an ack before redelivery (seconds)
NATS: AckWait. Default depends on provider.
Trait Implementations§
Source§impl Clone for SubscribeOptions
impl Clone for SubscribeOptions
Source§fn clone(&self) -> SubscribeOptions
fn clone(&self) -> SubscribeOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more