Merge "MON vROPs plugin patch for minor fixes found during testing"
authorhoban <adrian.hoban@intel.com>
Wed, 6 Dec 2017 16:00:23 +0000 (17:00 +0100)
committerGerrit Code Review <root@osm.etsi.org>
Wed, 6 Dec 2017 16:00:23 +0000 (17:00 +0100)
osm_mon/core/message_bus/producer.py

index a72410a..bccdd4c 100755 (executable)
@@ -50,14 +50,14 @@ class KafkaProducer(object):
             broker = "localhost:9092"
 
         '''
-        If the broker URI is not set in the env, by default,
+        If the broker URI is not set in the env by default,
         localhost container is taken as the host because an instance of
         is already running.
         '''
 
         self.producer = kaf(
             key_serializer=str.encode,
-            value_serializer=lambda v: json.dumps(v).encode('ascii'),
+            value_serializer=lambda v: json.dumps(v).str.encode,
             bootstrap_servers=broker, api_version=(0, 10))
 
     def publish(self, key, value, topic=None):