fix: SASL_PLAINTEXT port 9092 internal
This commit is contained in:
+1
-7
@@ -17,7 +17,6 @@ Env vars (set by Terraform):
|
||||
|
||||
import json
|
||||
import os
|
||||
import ssl
|
||||
import threading
|
||||
|
||||
from flask import Flask, jsonify
|
||||
@@ -108,18 +107,13 @@ def store_event(event):
|
||||
def consume_loop():
|
||||
global events_consumed, errors_count
|
||||
|
||||
ctx = ssl.create_default_context()
|
||||
ctx.check_hostname = False
|
||||
ctx.verify_mode = ssl.CERT_NONE
|
||||
|
||||
consumer = KafkaConsumer(
|
||||
KAFKA_TOPIC,
|
||||
bootstrap_servers=KAFKA_BROKERS,
|
||||
security_protocol="SASL_SSL",
|
||||
security_protocol="SASL_PLAINTEXT",
|
||||
sasl_mechanism="PLAIN",
|
||||
sasl_plain_username=KAFKA_USERNAME,
|
||||
sasl_plain_password=KAFKA_PASSWORD,
|
||||
ssl_context=ctx,
|
||||
group_id=KAFKA_GROUP_ID,
|
||||
auto_offset_reset="earliest",
|
||||
value_deserializer=lambda m: json.loads(m.decode("utf-8")),
|
||||
|
||||
Reference in New Issue
Block a user