Thalweg · API reference ← Main docs

ZerobusConfig

Struct ZerobusConfig 

Source
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: usize

Pool size floor per target table; override to match bandwidth (§3.3).

§per_stream_mb_ceiling: f64

The 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: usize

Per-stream in-flight-unacked bound — the backpressure channel capacity.

§max_in_flight_records: usize

SDK-side in-flight buffer target (≤ the SDK max, ~50k).

§preserve_order_by_partition: bool

Preserve 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: Duration

Per-ack deadline. Not a throughput knob — pipelining is.

§drain_budget: Duration

Graceful teardown budget on poison / shutdown.

§retry_backoff: Duration

Backoff applied before retrying a transient ack failure on the existing stream.

§max_ack_retries: u32

Maximum consecutive transient retries before a burst is treated as poison.

§role: Role

The sink’s role.

Implementations§

Source§

impl ZerobusConfig

Source

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

Source§

fn clone(&self) -> ZerobusConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ZerobusConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ZerobusConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,