Trait rdkafka::client::Context
[−]
[src]
pub trait Context: Send + Sync { fn log(&self, level: RDKafkaLogLevel, fac: &str, log_message: &str) { ... } fn stats(&self, statistics: Statistics) { ... } fn error(&self, error: KafkaError, reason: &str) { ... } }
A Context is an object that can store user-defined data and on which callbacks can be defined. Refer to the list of methods to see which callbacks can currently be overridden. The context must be thread safe, and might be owned by multiple threads.
Provided Methods
fn log(&self, level: RDKafkaLogLevel, fac: &str, log_message: &str)
Receives log lines from librdkafka.
fn stats(&self, statistics: Statistics)
Receives the statistics of the librdkafka client. To enable, the "statistics.interval.ms" configuration parameter must be specified.
fn error(&self, error: KafkaError, reason: &str)
Receives global errors from the librdkafka client.
Implementors
impl Context for EmptyContext
impl Context for EmptyConsumerContext
impl Context for EmptyProducerContext
impl<C: Context + 'static> Context for FutureProducerContext<C>