summaryrefslogtreecommitdiffstats
path: root/csit/resources/tests/kafka_producer.py
diff options
context:
space:
mode:
Diffstat (limited to 'csit/resources/tests/kafka_producer.py')
-rwxr-xr-xcsit/resources/tests/kafka_producer.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/csit/resources/tests/kafka_producer.py b/csit/resources/tests/kafka_producer.py
index a7d45647..e960b934 100755
--- a/csit/resources/tests/kafka_producer.py
+++ b/csit/resources/tests/kafka_producer.py
@@ -24,6 +24,7 @@
from confluent_kafka import Producer
import sys
+
def post_to_kafka(topic, message, bootstrap_server):
conf = {'bootstrap.servers': bootstrap_server}
@@ -37,5 +38,6 @@ def post_to_kafka(topic, message, bootstrap_server):
finally:
producer.flush()
+
if __name__ == '__main__':
post_to_kafka(sys.argv[1], sys.argv[2], sys.argv[3])