pub struct KafkaParams<'a> {
pub topic_name: String,
pub config_name: Option<&'a str>,
pub params: &'a [KafkaConfigParam],
pub key_rate_limit: Option<KeyRateLimit>,
}Expand description
Config for creating a Kafka producer.
Fields§
§topic_name: StringThe topic names to use. Can be a single topic or multiple topics for sharding.
config_name: Option<&'a str>The Kafka config name will be used to produce data.
params: &'a [KafkaConfigParam]Parameters for the Kafka producer configuration.
key_rate_limit: Option<KeyRateLimit>Optionally, a rate limit per partition key to protect against partition imbalance.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for KafkaParams<'a>
impl<'a> RefUnwindSafe for KafkaParams<'a>
impl<'a> Send for KafkaParams<'a>
impl<'a> Sync for KafkaParams<'a>
impl<'a> Unpin for KafkaParams<'a>
impl<'a> UnsafeUnpin for KafkaParams<'a>
impl<'a> UnwindSafe for KafkaParams<'a>
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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more