pub struct CustomContext;
Trait Implementations§
Source§impl ClientContext for CustomContext
impl ClientContext for CustomContext
Source§fn 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
Source§fn 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 moreSource§impl ConsumerContext for CustomContext
impl ConsumerContext for CustomContext
Source§fn 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.
Source§fn 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.
Source§fn 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.
Source§fn 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.Source§fn 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 Freeze for CustomContext
impl RefUnwindSafe for CustomContext
impl Send for CustomContext
impl Sync for CustomContext
impl Unpin for CustomContext
impl UnwindSafe for CustomContext
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