Skip to content

Commit 95f6cd8

Browse files
committed
Fix simple_consumer example
1 parent c811175 commit 95f6cd8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/simple_consumer.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use log::{info, warn};
44
use rdkafka::client::ClientContext;
55
use rdkafka::config::{ClientConfig, RDKafkaLogLevel};
66
use rdkafka::consumer::stream_consumer::StreamConsumer;
7-
use rdkafka::consumer::{CommitMode, Consumer, ConsumerContext, Rebalance};
7+
use rdkafka::consumer::{BaseConsumer, CommitMode, Consumer, ConsumerContext, Rebalance};
88
use rdkafka::error::KafkaResult;
99
use rdkafka::message::{Headers, Message};
1010
use rdkafka::topic_partition_list::TopicPartitionList;
@@ -22,11 +22,11 @@ struct CustomContext;
2222
impl ClientContext for CustomContext {}
2323

2424
impl ConsumerContext for CustomContext {
25-
fn pre_rebalance(&self, rebalance: &Rebalance) {
25+
fn pre_rebalance(&self, _: &BaseConsumer<Self>, rebalance: &Rebalance) {
2626
info!("Pre rebalance {:?}", rebalance);
2727
}
2828

29-
fn post_rebalance(&self, rebalance: &Rebalance) {
29+
fn post_rebalance(&self, _: &BaseConsumer<Self>, rebalance: &Rebalance) {
3030
info!("Post rebalance {:?}", rebalance);
3131
}
3232

0 commit comments

Comments
 (0)