struct KafkaSinkState {
Show 14 fields name: String, topic: String, topic_prefix: String, shutdown_flag: Arc<AtomicBool>, metrics: Arc<SinkMetrics>, producer: KafkaTxProducer, activator: Activator, transactional: bool, pending_rows: HashMap<Timestamp, Vec<EncodedRow>>, ready_rows: VecDeque<(Timestamp, Vec<EncodedRow>)>, retry_manager: Arc<Mutex<KafkaSinkSendRetryManager>>, sink_state: KafkaSinkStateEnum, latest_progress_ts: Timestamp, write_frontier: Rc<RefCell<Antichain<Timestamp>>>,
}

Fields

name: Stringtopic: Stringtopic_prefix: Stringshutdown_flag: Arc<AtomicBool>metrics: Arc<SinkMetrics>producer: KafkaTxProduceractivator: Activatortransactional: boolpending_rows: HashMap<Timestamp, Vec<EncodedRow>>ready_rows: VecDeque<(Timestamp, Vec<EncodedRow>)>retry_manager: Arc<Mutex<KafkaSinkSendRetryManager>>sink_state: KafkaSinkStateEnumlatest_progress_ts: Timestamp

Timestamp of the latest END record that was written out to Kafka.

write_frontier: Rc<RefCell<Antichain<Timestamp>>>

Write frontier of this sink.

The write frontier potentially blocks compaction of timestamp bindings in upstream sources. The latest written END record is used when restarting the sink to gate updates with a lower timestamp. We advance the write frontier in lockstep with writing out END records. This ensures that we don’t write updates more than once, ensuring exactly-once guarantees.

Implementations

Asserts that the write frontier has not yet advanced beyond t.

Updates the latest progress update timestamp to latest_update_ts if it is greater than the currently maintained timestamp.

This does not emit a progress update and should be used when the sink emits a progress update that is not based on updates of the input frontier.

See maybe_emit_progress.

Updates the latest progress update timestamp based on the given input frontier and pending rows.

This will emit an END record to the consistency topic if the frontier advanced and advance the maintained write frontier, which will in turn unblock compaction of timestamp bindings in sources.

NOTE: END records will only be emitted when KafkaSinkConnection.consistency points to a consistency topic. The write frontier will be advanced regardless.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Attaches the provided Context to this type, returning a WithContext wrapper. Read more

Attaches the current Context to this type, returning a WithContext wrapper. Read more

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

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

Calls U::from(self).

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

Wrap the input message T in a tonic::Request

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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

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