Skip to main content

RuntimeConfig

Struct RuntimeConfig 

Source
pub struct RuntimeConfig {
    pub source: RuntimeSourceConfig,
    pub snapshot_tables: Vec<String>,
    pub incremental_snapshot: Option<IncrementalSnapshotConfig>,
    pub checkpoint: Box<dyn Checkpoint>,
    pub schema_history: Box<dyn SchemaHistory>,
    pub options: RuntimeOptions,
}
Expand description

Runtime configuration for embedded execution.

Fields§

§source: RuntimeSourceConfig

Source configuration used by the runtime.

§snapshot_tables: Vec<String>

Snapshot table list used on first run when no checkpoint exists.

§incremental_snapshot: Option<IncrementalSnapshotConfig>

Optional incremental (non-blocking) snapshot configuration.

When set, runtime startup initializes stream ingestion through the connector’s watermark-based incremental snapshot handle instead of the classic snapshot + handoff path.

§checkpoint: Box<dyn Checkpoint>

Checkpoint backend owned by the runtime.

§schema_history: Box<dyn SchemaHistory>

Schema history backend owned by the runtime.

§options: RuntimeOptions

Explicit runtime options including observability and tuning defaults.

Implementations§

Source§

impl RuntimeConfig

Source

pub fn new<C, H>( source: RuntimeSourceConfig, checkpoint: C, schema_history: H, ) -> Self
where C: Checkpoint + 'static, H: SchemaHistory + 'static,

Create a config boxing the provided checkpoint and schema history implementations.

Source

pub fn with_options(self, options: RuntimeOptions) -> Self

Replace the full runtime options surface.

Source

pub fn with_observability(self, observability: RuntimeObservability) -> Self

Replace the observability configuration.

Source

pub fn with_metrics(self, metrics: Arc<dyn MetricsCollector>) -> Self

Override the metrics collector.

Source

pub fn with_tracer(self, tracer: Arc<dyn EventTracer>) -> Self

Override the tracer.

Source

pub fn with_max_buffer_size(self, max_buffer_size: usize) -> Self

Override the maximum buffer size.

Source

pub fn with_max_poll_wait_ms(self, max_poll_wait_ms: u64) -> Self

Override the poll wait budget in milliseconds.

Source

pub fn with_transform_error_policy(self, policy: TransformErrorPolicy) -> Self

Configure transform failure behavior. Defaults to TransformErrorPolicy::Halt.

§Operational Guidance
  • Production: Use Halt (default) to fail fast on data corruption.
  • Staging/Testing: Use Skip for tolerant evaluation (e.g., optional enrichment).
  • Change at Runtime: Policy is set at config time; to change behavior, recreate runtime.
§Error Context

Errors during transform execution include the transform’s name and the event ID, enabling quick diagnosis. All failed events are logged regardless of policy.

Source

pub fn with_post_commit_source_confirm_policy( self, policy: PostCommitSourceConfirmPolicy, ) -> Self

Configure post-commit source confirmation behavior.

Source

pub fn with_idempotency(self, idempotency: IdempotencyOptions) -> Self

Configure runtime-level idempotency guard options.

Duplicate detection runs before transform stages, so dedupe decisions are stable even when downstream transforms are nondeterministic.

Source

pub fn with_idempotency_disabled(self) -> Self

Explicitly disable runtime-level duplicate suppression.

Source

pub fn with_event_validation(self, enabled: bool) -> Self

Enable or disable canonical event-envelope validation at runtime ingress.

Source

pub fn with_schema_history_retention( self, retention: SchemaHistoryRetention, ) -> Self

Configure runtime-managed schema-history retention after DDL persistence.

Source

pub fn with_snapshot_tables(self, snapshot_tables: Vec<String>) -> Self

Configure snapshot tables for initial snapshot mode.

Source

pub fn with_incremental_snapshot( self, config: IncrementalSnapshotConfig, ) -> Self

Configure runtime startup to use incremental (non-blocking) snapshot mode.

This supersedes the classic with_snapshot_tables bootstrapping path. Do not set both at once.

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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