File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
example-projects/rdkafka-example Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -19,5 +19,7 @@ tokio = { version = "^0.2", features = ["full"] }
1919clap = " 2.33.1"
2020
2121[dependencies .rdkafka ]
22- version = " ~0.23"
23- features = [" ssl" , " sasl" ]
22+ version = " ^0.24"
23+ features = [" cmake-build" ]
24+
25+ [workspace ]
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ use rdkafka::config::{ClientConfig, RDKafkaLogLevel};
99use rdkafka:: consumer:: stream_consumer:: StreamConsumer ;
1010use rdkafka:: consumer:: { CommitMode , Consumer , DefaultConsumerContext } ;
1111use rdkafka:: producer:: { FutureProducer , FutureRecord } ;
12+ use std:: time:: Duration ;
1213
1314// You need a running Kafka cluster to try out this example.
1415// With docker: docker run --rm --net=host -e ADV_HOST=localhost -e SAMPLEDATA=0 lensesio/fast-data-dev
@@ -78,7 +79,7 @@ async fn produce(brokers: &str, topic_name: &str) {
7879 FutureRecord :: to ( topic_name)
7980 . message_record ( & message_record)
8081 . key ( & format ! ( "Key {}" , i) ) ,
81- 0 ,
82+ Duration :: from_secs ( 10 ) ,
8283 )
8384 . await ;
8485
You can’t perform that action at this time.
0 commit comments