diff --git a/ccx_messaging/publishers/kafka_publisher.py b/ccx_messaging/publishers/kafka_publisher.py index 1b0026b..6376fc8 100644 --- a/ccx_messaging/publishers/kafka_publisher.py +++ b/ccx_messaging/publishers/kafka_publisher.py @@ -70,7 +70,7 @@ def __init__(self, outgoing_topic: str, kafka_broker_config: dict = None, **kwar def produce(self, outgoing_message: bytes): """Send the message though the Kafka producer.""" if self.compression: - self.producer.produce(self.topic, gzip.compress(outgoing_message)) + self.producer.produce(self.topic, gzip.compress(outgoing_message,compresslevel=9)) else: self.producer.produce(self.topic, outgoing_message) self.producer.poll(0)