pub async fn build_kafka(
    sink_id: GlobalId,
    connection: &KafkaSinkConnection,
    storage_configuration: &StorageConfiguration
) -> Result<Option<Option<Timestamp>>, ContextCreationError>
Expand description

Ensures that the Kafka sink’s data and consistency collateral exist, as well as returning the last complete timestamp that the last incarnation of the sink committed to Kafka.

IMPORTANT: to achieve exactly once guarantees, the producer that will resume production at the returned timestamp must have called init_transactions prior to calling this method.

Errors

  • If the KafkaSinkConnection’s consistency collateral exists and contains data for this sink, but the sink’s data topic does not exist.