pub struct ZerobusConfig {
pub streams_per_table: usize,
pub per_stream_mb_ceiling: f64,
pub ack_channel_capacity: usize,
pub max_in_flight_records: usize,
pub preserve_order_by_partition: bool,
pub server_ack_timeout: Duration,
pub drain_budget: Duration,
pub retry_backoff: Duration,
pub max_ack_retries: u32,
pub role: Role,
}Expand description
Sink configuration.
Fields§
§streams_per_table: usizePool size floor per target table; override to match bandwidth (§3.3).
per_stream_mb_ceiling: f64The per-stream MB/s figure the derived pool size uses. Defaults to the Databricks-documented ~100 MB/s per-stream hard limit; set lower to leave headroom.
ack_channel_capacity: usizePer-stream in-flight-unacked bound — the backpressure channel capacity.
max_in_flight_records: usizeSDK-side in-flight buffer target (≤ the SDK max, ~50k).
preserve_order_by_partition: boolPreserve per-source-partition ordering: when true, all batches from one
(topic, partition) are key-hashed to a fixed stream (Zerobus guarantees
order within a stream); when false, batches round-robin across the pool.
This is partition-granular, not record-granular: a per-column ordering key cannot be honoured at batch granularity (a batch holds many rows with different key values), so ordering is preserved at the unit the source already partitions by.
server_ack_timeout: DurationPer-ack deadline. Not a throughput knob — pipelining is.
drain_budget: DurationGraceful teardown budget on poison / shutdown.
retry_backoff: DurationBackoff applied before retrying a transient ack failure on the existing stream.
max_ack_retries: u32Maximum consecutive transient retries before a burst is treated as poison.
role: RoleThe sink’s role.
Implementations§
Source§impl ZerobusConfig
impl ZerobusConfig
Sourcepub fn derive_pool_size(&self, peak_mb_per_s: f64) -> usize
pub fn derive_pool_size(&self, peak_mb_per_s: f64) -> usize
Derive the pool size for a table from its peak bandwidth (§3.3):
ceil(peak_MB_per_s / per_stream_mb_ceiling), floored at the configured
minimum and at 1. Sizing is by bytes, so large-record tables get more
streams at a lower record rate.
Trait Implementations§
Source§impl Clone for ZerobusConfig
impl Clone for ZerobusConfig
Source§fn clone(&self) -> ZerobusConfig
fn clone(&self) -> ZerobusConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ZerobusConfig
impl Debug for ZerobusConfig
Auto Trait Implementations§
impl Freeze for ZerobusConfig
impl RefUnwindSafe for ZerobusConfig
impl Send for ZerobusConfig
impl Sync for ZerobusConfig
impl Unpin for ZerobusConfig
impl UnwindSafe for ZerobusConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].