From 2cc53622ad8d64afe29c10143d1d3152103cf534 Mon Sep 17 00:00:00 2001 From: khushal Date: Tue, 24 Dec 2024 16:55:51 +0530 Subject: [PATCH] (20241224) ... --- playground/socketio/from_kafka.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/playground/socketio/from_kafka.py b/playground/socketio/from_kafka.py index 7edad1d..2fb0cab 100644 --- a/playground/socketio/from_kafka.py +++ b/playground/socketio/from_kafka.py @@ -30,23 +30,23 @@ import os # Define the test params: TOPIC = "tickers" BOOTSTRAP_SERVERS = "del.ditscentre.in:9092" -SSL_CONTEXT = get_ssl_context( - ca_file = "../../creds/kafka/cert_authority.pem", - cert_file = "../../creds/kafka/fullchain.pem", - key_file = "../../creds/kafka/privkey.pem" -) - -# cwd = files.get_cwd() -# # parent_dir = files.get_parent_directory(cwd, 2) -# parent_dir = cwd -# print("CWD:", cwd) -# # print("PD:", parent_dir) # SSL_CONTEXT = get_ssl_context( -# ca_file = os.path.join(parent_dir, "creds", "kafka", "cert_authority.pem"), -# cert_file = os.path.join(parent_dir, "creds", "kafka", "fullchain.pem"), -# key_file = os.path.join(parent_dir, "creds", "kafka", "privkey.pem") +# ca_file = "../../creds/kafka/cert_authority.pem", +# cert_file = "../../creds/kafka/fullchain.pem", +# key_file = "../../creds/kafka/privkey.pem" # ) +cwd = files.get_cwd() +# parent_dir = files.get_parent_directory(cwd, 2) +parent_dir = cwd +print("CWD:", cwd) +# print("PD:", parent_dir) +SSL_CONTEXT = get_ssl_context( + ca_file = os.path.join(parent_dir, "creds", "kafka", "cert_authority.pem"), + cert_file = os.path.join(parent_dir, "creds", "kafka", "fullchain.pem"), + key_file = os.path.join(parent_dir, "creds", "kafka", "privkey.pem") +) + my_consumer = ConsumerKafka( topic = TOPIC,