Skip to content

Commit

Permalink
Merge pull request #47 from RedHatInsights/fix_producer_config
Browse files Browse the repository at this point in the history
Clean up the configuration before using it on producer
  • Loading branch information
joselsegura authored Mar 20, 2023
2 parents 5df6f30 + f766ea2 commit 33f35b8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ccx_messaging/publishers/data_pipeline_publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from kafka import KafkaProducer

from ccx_messaging.error import CCXMessagingError
from ccx_messaging.utils.kafka_config import producer_config

LOG = logging.getLogger(__name__)

Expand All @@ -43,7 +44,9 @@ def __init__(self, outgoing_topic, bootstrap_servers, **kwargs):
if self.topic is None:
raise KeyError("outgoing_topic")

self.producer = KafkaProducer(bootstrap_servers=self.bootstrap_servers, **kwargs)
self.producer = KafkaProducer(
bootstrap_servers=self.bootstrap_servers, **producer_config(kwargs)
)
LOG.info("Producing to topic '%s' on brokers %s", self.topic, self.bootstrap_servers)
self.outdata_schema_version = 2

Expand Down

0 comments on commit 33f35b8

Please sign in to comment.