Struct rust_with_kafka_tls::custom_context::CustomContext
source · [−]pub struct CustomContext;
Trait Implementations
sourceimpl ClientContext for CustomContext
impl ClientContext for CustomContext
sourcefn log(&self, level: RDKafkaLogLevel, fac: &str, log_message: &str)
fn log(&self, level: RDKafkaLogLevel, fac: &str, log_message: &str)
Receives log lines from librdkafka. Read more
sourcefn stats(&self, statistics: Statistics)
fn stats(&self, statistics: Statistics)
Receives the decoded statistics of the librdkafka client. To enable, the
statistics.interval.ms
configuration parameter must be specified. Read moresourcefn stats_raw(&self, statistics: &[u8])
fn stats_raw(&self, statistics: &[u8])
Receives the JSON-encoded statistics of the librdkafka client. To
enable, the
statistics.interval.ms
configuration parameter must be
specified. Read moresourcefn error(&self, error: KafkaError, reason: &str)
fn error(&self, error: KafkaError, reason: &str)
Receives global errors from the librdkafka client. Read more
sourceimpl ConsumerContext for CustomContext
impl ConsumerContext for CustomContext
sourcefn pre_rebalance(&self, rebalance: &Rebalance<'_>)
fn pre_rebalance(&self, rebalance: &Rebalance<'_>)
Pre-rebalance callback. This method will run before the rebalance and
should terminate its execution quickly. Read more
sourcefn post_rebalance(&self, rebalance: &Rebalance<'_>)
fn post_rebalance(&self, rebalance: &Rebalance<'_>)
Post-rebalance callback. This method will run after the rebalance and
should terminate its execution quickly. Read more
sourcefn commit_callback(&self, result: KafkaResult<()>, _offsets: &TopicPartitionList)
fn commit_callback(&self, result: KafkaResult<()>, _offsets: &TopicPartitionList)
Post commit callback. This method will run after a group of offsets was
committed to the offset store. Read more
sourcefn rebalance(
&self,
native_client: &NativeClient,
err: rd_kafka_resp_err_t,
tpl: &mut TopicPartitionList
)
fn rebalance(
&self,
native_client: &NativeClient,
err: rd_kafka_resp_err_t,
tpl: &mut TopicPartitionList
)
Implements the default rebalancing strategy and calls the
pre_rebalance
and
post_rebalance
methods. If this
method is overridden, it will be responsibility of the user to call them
if needed. Read moresourcefn main_queue_min_poll_interval(&self) -> Timeout
fn main_queue_min_poll_interval(&self) -> Timeout
Returns the minimum interval at which to poll the main queue, which
services the logging, stats, and error callbacks. Read more
Auto Trait Implementations
impl RefUnwindSafe for CustomContext
impl Send for CustomContext
impl Sync for CustomContext
impl Unpin for CustomContext
impl UnwindSafe for CustomContext
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more