(20241224) MCX data test.
This commit is contained in:
@@ -28,25 +28,26 @@ from utils_v2.queue.async_kafka import ProducerKafka, ConsumerKafka, get_ssl_con
|
||||
import os
|
||||
|
||||
# Define the test params:
|
||||
TOPIC = "kft_file_upload"
|
||||
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 = "../../creds/kafka/cert_authority.pem",
|
||||
# cert_file = "../../creds/kafka/fullchain.pem",
|
||||
# key_file = "../../creds/kafka/privkey.pem"
|
||||
# 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")
|
||||
# )
|
||||
|
||||
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,
|
||||
bootstrap_servers = BOOTSTRAP_SERVERS,
|
||||
|
||||
Reference in New Issue
Block a user