pub struct KafkaSourceConfig {
pub brokers: String,
pub topic: String,
pub group_id: String,
pub commit_interval: Duration,
pub startup_timeout: Duration,
pub statistics_interval: Duration,
pub rdkafka: BTreeMap<String, String>,
}Expand description
Configuration of a KafkaSource, deserialized
from the pipeline’s opaque source: { kafka: ... } section.
Fields§
§brokers: StringComma-separated bootstrap servers.
topic: StringThe topic to consume. One topic per pipeline: the framework’s
PartitionId is the Kafka partition number, which is only unique
within a single topic.
group_id: StringConsumer group id.
commit_interval: DurationHow often stored offsets are auto-committed
(librdkafka auto.commit.interval.ms).
startup_timeout: DurationHow long to wait for the first partition assignment before the source reports a fatal startup error.
statistics_interval: DurationStatistics emission interval feeding lag metrics. Zero disables statistics.
rdkafka: BTreeMap<String, String>Raw librdkafka properties, applied verbatim after validation.
Framework-owned properties (see crate docs) are rejected;
prefetch backstops (queued.min.messages,
queued.max.messages.kbytes) may be tuned here.
Implementations§
Source§impl KafkaSourceConfig
impl KafkaSourceConfig
Sourcepub fn from_component_config(
section: &ComponentConfig,
) -> Result<Self, ConfigError>
pub fn from_component_config( section: &ComponentConfig, ) -> Result<Self, ConfigError>
Deserialize and validate from the pipeline’s opaque component section.
Sourcepub fn validate(&self) -> Result<(), ConfigError>
pub fn validate(&self) -> Result<(), ConfigError>
Cross-field validation, including the passthrough denylist.
Trait Implementations§
Source§impl Clone for KafkaSourceConfig
impl Clone for KafkaSourceConfig
Source§fn clone(&self) -> KafkaSourceConfig
fn clone(&self) -> KafkaSourceConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KafkaSourceConfig
impl Debug for KafkaSourceConfig
Source§impl<'de> Deserialize<'de> for KafkaSourceConfig
impl<'de> Deserialize<'de> for KafkaSourceConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for KafkaSourceConfig
impl PartialEq for KafkaSourceConfig
Source§fn eq(&self, other: &KafkaSourceConfig) -> bool
fn eq(&self, other: &KafkaSourceConfig) -> bool
self and other values to be equal, and is used by ==.