pub struct TracingContext;
Expand description
Logs rebalance lifecycle & commit callbacks via [tracing
].
§Arguments
c
- The consumerr
- The rebalance
§Returns
()
- Always succeeds, logs any errors
§Examples
use ds_event_stream_rs_sdk::consumer::TracingContext;
§Panics
()
- Always succeeds, logs any errors
§Errors
()
- Always succeeds, logs any errors
Trait Implementations§
Source§impl ClientContext for TracingContext
impl ClientContext for TracingContext
§const ENABLE_REFRESH_OAUTH_TOKEN: bool = false
const ENABLE_REFRESH_OAUTH_TOKEN: bool = false
Whether to periodically refresh the SASL
OAUTHBEARER
token
by calling [ClientContext::generate_oauth_token
]. Read more§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
§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 more§fn 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 moreSource§impl ConsumerContext for TracingContext
impl ConsumerContext for TracingContext
Source§fn pre_rebalance<'a>(
&self,
_c: &BaseConsumer<TracingContext>,
r: &Rebalance<'a>,
)
fn pre_rebalance<'a>( &self, _c: &BaseConsumer<TracingContext>, r: &Rebalance<'a>, )
Pre-rebalance callback. This method will run before the rebalance and
should terminate its execution quickly.
Source§fn post_rebalance<'a>(
&self,
_c: &BaseConsumer<TracingContext>,
r: &Rebalance<'a>,
)
fn post_rebalance<'a>( &self, _c: &BaseConsumer<TracingContext>, r: &Rebalance<'a>, )
Post-rebalance callback. This method will run after the rebalance and
should terminate its execution quickly.
Source§fn commit_callback(&self, res: KafkaResult<()>, offs: &TopicPartitionList)
fn commit_callback(&self, res: KafkaResult<()>, offs: &TopicPartitionList)
Post commit callback. This method will run after a group of offsets was
committed to the offset store.
§fn rebalance(
&self,
base_consumer: &BaseConsumer<Self>,
err: rd_kafka_resp_err_t,
tpl: &mut TopicPartitionList,
)
fn rebalance( &self, base_consumer: &BaseConsumer<Self>, 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.§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 events. Read more
Auto Trait Implementations§
impl Freeze for TracingContext
impl RefUnwindSafe for TracingContext
impl Send for TracingContext
impl Sync for TracingContext
impl Unpin for TracingContext
impl UnwindSafe for TracingContext
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