feat: context kafka

This commit is contained in:
2025-04-09 16:29:39 +04:00
parent a81e692957
commit 498ab093f3
5 changed files with 24 additions and 2 deletions

11
external/kafka/context.py vendored Normal file
View File

@@ -0,0 +1,11 @@
from pathlib import Path
from aiokafka.helpers import create_ssl_context
from constants import KAFKA_CERTS_PATH
context = create_ssl_context(
cafile=KAFKA_CERTS_PATH / Path('ca-cert'),
certfile=KAFKA_CERTS_PATH / Path('cert-signed'),
keyfile=KAFKA_CERTS_PATH / Path('cert-key'),
)