"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "monasca_api/common/messaging/kafka_publisher.py" between
monasca-api-3.1.0.tar.gz and monasca-api-4.0.0.tar.gz

About: OpenStack Monasca API is a RESTful API server that is designed with a layered architecture and supports Monitoring as a Service (MONaaS).
The "Ussuri" series (latest release).

kafka_publisher.py  (monasca-api-3.1.0):kafka_publisher.py  (monasca-api-4.0.0)
skipping to change at line 45 skipping to change at line 45
self.group = cfg.CONF.kafka.group self.group = cfg.CONF.kafka.group
self.wait_time = cfg.CONF.kafka.wait_time self.wait_time = cfg.CONF.kafka.wait_time
self.is_async = cfg.CONF.kafka.is_async self.is_async = cfg.CONF.kafka.is_async
self.ack_time = cfg.CONF.kafka.ack_time self.ack_time = cfg.CONF.kafka.ack_time
self.max_retry = cfg.CONF.kafka.max_retry self.max_retry = cfg.CONF.kafka.max_retry
self.auto_commit = cfg.CONF.kafka.auto_commit self.auto_commit = cfg.CONF.kafka.auto_commit
self.compact = cfg.CONF.kafka.compact self.compact = cfg.CONF.kafka.compact
self.partitions = cfg.CONF.kafka.partitions self.partitions = cfg.CONF.kafka.partitions
self.drop_data = cfg.CONF.kafka.drop_data self.drop_data = cfg.CONF.kafka.drop_data
config = {'queue.buffering.max.messages':
self._producer = client_factory.get_kafka_producer( self._producer = client_factory.get_kafka_producer(
self.uri, cfg.CONF.kafka.legacy_kafka_client_enabled) self.uri, cfg.CONF.kafka.legacy_kafka_client_enabled, **config)
def close(self): def close(self):
pass pass
def send_message(self, message): def send_message(self, message):
try: try:
self._producer.publish(self.topic, message) self._producer.publish(self.topic, message)
except (kafka_common.KafkaUnavailableError, except (kafka_common.KafkaUnavailableError,
kafka_common.LeaderNotAvailableError): kafka_common.LeaderNotAvailableError):
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)