pub struct KafkaInputConfig {Show 14 fields
pub kafka_options: BTreeMap<String, String>,
pub topic: String,
pub log_level: Option<KafkaLogLevel>,
pub group_join_timeout_secs: u32,
pub poller_threads: Option<usize>,
pub start_from: KafkaStartFromConfig,
pub region: Option<String>,
pub partitions: Option<Vec<i32>>,
pub resume_earliest_if_data_expires: bool,
pub include_headers: Option<bool>,
pub include_timestamp: Option<bool>,
pub include_partition: Option<bool>,
pub include_offset: Option<bool>,
pub include_topic: Option<bool>,
}Expand description
Configuration for reading data from Kafka topics with InputTransport.
Fields§
§kafka_options: BTreeMap<String, String>Options passed directly to rdkafka.
librdkafka options
used to configure the Kafka consumer.
This input connector does not use consumer groups, so options related to consumer groups are rejected, including:
group.id, if present, is ignored.auto.offset.reset(usestart_frominstead).- “enable.auto.commit”, if present, must be set to “false”.
- “enable.auto.offset.store”, if present, must be set to “false”.
topic: StringTopic to subscribe to.
log_level: Option<KafkaLogLevel>The log level of the client.
If not specified, the log level will be calculated based on the global
log level of the log crate.
group_join_timeout_secs: u32Maximum timeout in seconds to wait for the endpoint to join the Kafka consumer group during initialization.
poller_threads: Option<usize>Set to 1 or more to fix the number of threads used to poll
rdkafka. Multiple threads can increase performance with small Kafka
messages; for large messages, one thread is enough. In either case, too
many threads can harm performance. If unset, the default is 3, which
helps with small messages but will not harm performance with large
messagee
start_from: KafkaStartFromConfigWhere to begin reading the topic.
region: Option<String>The AWS region to use while connecting to AWS Managed Streaming for Kafka (MSK).
partitions: Option<Vec<i32>>The list of Kafka partitions to read from.
Only the specified partitions will be consumed. If this field is not set, the connector will consume from all available partitions.
If start_from is set to offsets and this field is provided, the
number of partitions must exactly match the number of offsets, and the
order of partitions must correspond to the order of offsets.
If offsets are provided for all partitions, this field can be omitted.
resume_earliest_if_data_expires: boolBy default, if the input connector resumes from a checkpoint and the data where it needs to resume has expired from the Kafka topic, the input connector fails initialization and the pipeline will fail to start.
Set this to true to change the behavior so that, if data is not available on resume, the input connector starts from the earliest offsets that are now available.
include_headers: Option<bool>Whether to include Kafka headers in the record metadata.
When true, Kafka message headers are available via the CONNECTOR_METADATA() function.
See https://docs.feldera.com/connectors/sources/kafka#metadata for details.
include_timestamp: Option<bool>Whether to include Kafka message timestamp in the record metadata.
When true, Kafka message timestamp is available via the CONNECTOR_METADATA() function.
See https://docs.feldera.com/connectors/sources/kafka#metadata for details.
include_partition: Option<bool>Whether to include Kafka partition in the record metadata.
When true, Kafka partition from which the message was read is available via the CONNECTOR_METADATA() function.
See https://docs.feldera.com/connectors/sources/kafka#metadata for details.
include_offset: Option<bool>Whether to include Kafka message offset in the record metadata.
When true, Kafka message offset is available via the CONNECTOR_METADATA() function.
See https://docs.feldera.com/connectors/sources/kafka#metadata for details.
include_topic: Option<bool>Whether to include Kafka topic in the record metadata.
When true, Kafka topic from which the message was read is available via the CONNECTOR_METADATA() function.
See https://docs.feldera.com/connectors/sources/kafka#metadata for details.
Implementations§
Source§impl KafkaInputConfig
impl KafkaInputConfig
pub fn poller_threads(&self) -> usize
pub fn metadata_requested(&self) -> bool
Trait Implementations§
Source§impl Clone for KafkaInputConfig
impl Clone for KafkaInputConfig
Source§fn clone(&self) -> KafkaInputConfig
fn clone(&self) -> KafkaInputConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KafkaInputConfig
impl Debug for KafkaInputConfig
Source§impl<'de> Deserialize<'de> for KafkaInputConfig
impl<'de> Deserialize<'de> for KafkaInputConfig
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 KafkaInputConfig
impl PartialEq for KafkaInputConfig
Source§impl Serialize for KafkaInputConfig
impl Serialize for KafkaInputConfig
Source§impl<'__s> ToSchema<'__s> for KafkaInputConfig
impl<'__s> ToSchema<'__s> for KafkaInputConfig
impl Eq for KafkaInputConfig
impl StructuralPartialEq for KafkaInputConfig
Auto Trait Implementations§
impl Freeze for KafkaInputConfig
impl RefUnwindSafe for KafkaInputConfig
impl Send for KafkaInputConfig
impl Sync for KafkaInputConfig
impl Unpin for KafkaInputConfig
impl UnwindSafe for KafkaInputConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.