pub struct CaptureConfig {
pub brokers: Vec<String>,
pub topic: String,
pub redact: bool,
pub tls: Option<CaptureTlsConfig>,
pub max_inflight: usize,
pub max_attempts: u32,
pub backoff_ms: u64,
pub wal_dir: Option<String>,
pub wal_max_bytes: u64,
}Expand description
Full-fidelity traffic capture settings: where to send the captured exchange stream. This is plain data (no broker types), so the config crate stays independent of any Kafka client; the binary builds the producer from it.
Fields§
§brokers: Vec<String>The Kafka bootstrap brokers (host:port), at least one.
topic: StringThe topic each captured exchange envelope is produced to.
redact: boolWhether to redact the Authorization header from the captured stream
(default true). The capture stream is privileged and carries bodies and
values verbatim, so credentials are stripped unless explicitly kept.
tls: Option<CaptureTlsConfig>TLS to the brokers, or None for a plaintext broker connection.
max_inflight: usizeThe most records in flight (buffered + retrying) at once before a produce is dropped, bounding memory. Higher = fewer drops under load, more memory.
max_attempts: u32Total send attempts per record before giving up. Higher = better delivery odds across a transient broker blip, at the cost of more retry work.
backoff_ms: u64The first retry backoff in milliseconds; it doubles after each failure.
wal_dir: Option<String>Directory for the durable on-disk spill buffer, or None for in-memory
best-effort. Set it for at-least-once capture that survives a restart:
records persist to a write-ahead log here and replay until acknowledged.
wal_max_bytes: u64Cap on undelivered bytes in the spill buffer before new records are dropped
(only meaningful with wal_dir). Bounds disk like max_inflight bounds memory.
Trait Implementations§
Source§impl Clone for CaptureConfig
impl Clone for CaptureConfig
Source§fn clone(&self) -> CaptureConfig
fn clone(&self) -> CaptureConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CaptureConfig
impl Debug for CaptureConfig
impl Eq for CaptureConfig
Source§impl PartialEq for CaptureConfig
impl PartialEq for CaptureConfig
Source§fn eq(&self, other: &CaptureConfig) -> bool
fn eq(&self, other: &CaptureConfig) -> bool
self and other values to be equal, and is used by ==.