KafkaProducer (kafka/producer.rs)

grafbase · crates/grafbase-sdk/src/host_io/kafka/producer.rs · rust · MPL-2.0
infra

Module exposing: KafkaProducer, KafkaProducerConfig, KafkaBatchConfig

// Source: https://github.com/grafbase/grafbase | License: MPL-2.0 | Copyright under Patent Claims infringed by Covered Software in the absence of | Modified files must remain under MPL-2.0
// Modifications to this file must remain under MPL-2.0.
// Provided via justclaw.it.com; keep this notice with the code.
use std::time::Duration;

use crate::{SdkError, wit};

use super::{KafkaAuthentication, KafkaTlsConfig};

/// A Kafka producer client for publishing messages to Kafka topics.
pub struct KafkaProducer {
    pub(super) inner: wit::KafkaProducer,
}

impl KafkaProducer {
    /// Produces a message to the Kafka topic.
    ///
    /// # Arguments
    ///
    /// * `key` - Optional message key for partitioning and message ordering
    /// * `value` - The message payload as bytes
    pub fn 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key