Adds unique group_id to KafkaConsumer used in MonClient 71/6671/1
authorBenjamin Diaz <bdiaz@whitestack.com>
Tue, 9 Oct 2018 23:07:43 +0000 (20:07 -0300)
committerBenjamin Diaz <bdiaz@whitestack.com>
Tue, 9 Oct 2018 23:08:52 +0000 (20:08 -0300)
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
osm_policy_module/common/mon_client.py

index 724fe83..5d2416e 100644 (file)
@@ -53,7 +53,8 @@ class MonClient:
         consumer = KafkaConsumer(bootstrap_servers=self.kafka_server,
                                  key_deserializer=bytes.decode,
                                  value_deserializer=bytes.decode,
-                                 consumer_timeout_ms=10000)
+                                 consumer_timeout_ms=10000,
+                                 group_id='mon-client-' + str(uuid.uuid4()))
         consumer.subscribe(['alarm_response'])
         for message in consumer:
             if message.key == 'create_alarm_response':