parent
45b3984aa3
commit
e49f2ca5c7
|
@ -25,7 +25,7 @@ use rskafka::{
|
||||||
client::{
|
client::{
|
||||||
consumer::{StartOffset, StreamConsumerBuilder},
|
consumer::{StartOffset, StreamConsumerBuilder},
|
||||||
error::{Error as RSKafkaError, ProtocolError},
|
error::{Error as RSKafkaError, ProtocolError},
|
||||||
partition::{OffsetAt, PartitionClient, UnknownTopicHandling},
|
partition::{Compression, OffsetAt, PartitionClient, UnknownTopicHandling},
|
||||||
producer::{BatchProducer, BatchProducerBuilder},
|
producer::{BatchProducer, BatchProducerBuilder},
|
||||||
ClientBuilder,
|
ClientBuilder,
|
||||||
},
|
},
|
||||||
|
@ -90,7 +90,8 @@ impl RSKafkaProducer {
|
||||||
);
|
);
|
||||||
|
|
||||||
let mut producer_builder =
|
let mut producer_builder =
|
||||||
BatchProducerBuilder::new_with_client(Arc::new(partition_client));
|
BatchProducerBuilder::new_with_client(Arc::new(partition_client))
|
||||||
|
.with_compression(Compression::Zstd);
|
||||||
if let Some(linger) = producer_config.linger {
|
if let Some(linger) = producer_config.linger {
|
||||||
producer_builder = producer_builder.with_linger(linger);
|
producer_builder = producer_builder.with_linger(linger);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue