pub struct ReconnectionConfig {
pub initial_delay: Duration,
pub max_delay: Duration,
pub max_attempts: Option<u32>,
pub backoff_multiplier: f64,
pub http2_keep_alive_interval: Option<Duration>,
pub live_fallback_attempts: Option<u32>,
}Expand description
Configuration for gRPC stream reconnection with exponential backoff
Fields§
§initial_delay: DurationInitial delay before first reconnection attempt
max_delay: DurationMaximum delay between reconnection attempts
max_attempts: Option<u32>Maximum number of reconnection attempts (None = infinite)
backoff_multiplier: f64Multiplier for exponential backoff (typically 2.0)
http2_keep_alive_interval: Option<Duration>HTTP/2 keep-alive interval to prevent silent disconnects
live_fallback_attempts: Option<u32>Consecutive short-lived connections before a runtime with no snapshot to replay gives up on its checkpoint and subscribes live.
The fallback trades data for availability: every slot between the
checkpoint and the live tip is lost. None refuses that trade and
keeps retrying from the checkpoint, which is what a recorder wants.
Implementations§
Source§impl ReconnectionConfig
impl ReconnectionConfig
pub fn new() -> Self
pub fn with_initial_delay(self, delay: Duration) -> Self
pub fn with_max_delay(self, delay: Duration) -> Self
pub fn with_max_attempts(self, attempts: u32) -> Self
pub fn with_backoff_multiplier(self, multiplier: f64) -> Self
pub fn with_http2_keep_alive_interval(self, interval: Duration) -> Self
Sourcepub fn fail_closed(self) -> Self
pub fn fail_closed(self) -> Self
Never abandon the resume checkpoint, even if the provider keeps refusing it. Ingestion stalls rather than silently skipping slots.
Sourcepub fn next_backoff(&self, current: Duration) -> Duration
pub fn next_backoff(&self, current: Duration) -> Duration
Calculate the next backoff duration given the current one