datum-mq 0.10.4

Kafka sources and sinks for Datum streams, backed by rdkafka
Documentation
#![forbid(unsafe_code)]
//! Kafka sources and sinks for Datum streams.
//!
//! `datum-mq` is an additive Datum satellite crate backed by
//! [`rdkafka`](https://docs.rs/rdkafka/0.39.0), which wraps `librdkafka`.
//! The crate itself forbids unsafe Rust, but the dependency chain contains
//! FFI/C code and `librdkafka` owns its own polling threads and internal
//! queues. Treat this connector as a pragmatic Kafka integration, not as a pure
//! Tokio-native carrier.
//!
//! The shipped guarantee is at-least-once. [`KafkaSource::committable`] emits a
//! [`datum::SourceWithContext`] whose context is a [`KafkaOffset`]; downstream
//! code commits that offset only after its own checkpoint/side effect succeeds.
//! [`KafkaSink`] uses idempotent `rdkafka` production by default, polls delivery
//! callbacks during the run, and its materialized [`KafkaProducerControl`]
//! drains final acknowledgements before shutdown. An experimental TLS/SASL-capable,
//! uncompressed native producer is selectable with [`KafkaProducerBackend`].
//! It uses bounded, partition-ordered Produce pipelining and is intentionally
//! non-idempotent: a lost response can duplicate an accepted partition batch.
//! Kafka transactions and consume-transform-produce EOS are deferred.

mod config;
mod error;
mod metrics;
mod native;
mod offset;
#[doc(hidden)]
pub mod profile;
mod record;
mod sink;
mod source;

pub use config::{
    CommitPolicy, KafkaConfig, KafkaConsumerBackend, KafkaConsumerSettings, KafkaProducerBackend,
    KafkaProducerSettings, Subscription, TopicPartitionOffset,
};
pub use error::{MqError, MqResult};
pub use metrics::{KafkaMetrics, KafkaMetricsSnapshot};
pub use offset::{KafkaBatchOffset, KafkaOffset, KafkaOffsetBatch, OffsetCommit, TopicPartition};
pub use record::{ConsumerRecord, KafkaHeader, KafkaTimestamp, ProducerRecord};
pub use sink::{KafkaProducerControl, KafkaSink};
pub use source::{KafkaControl, KafkaPayloadBatch, KafkaPayloadRecord, KafkaSource};

/// The `datum-mq` crate version.
pub const VERSION: &str = env!("CARGO_PKG_VERSION");