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

View File

@@ -3,11 +3,14 @@ from aiokafka.errors import KafkaConnectionError
from backend.config import KAFKA_URL, KAFKA_CONSUMER_TOPIC
from backend.session import session_maker
from external.kafka.context import context
from external.kafka.services.consumer_service import ConsumerService
consumer = AIOKafkaConsumer(
KAFKA_CONSUMER_TOPIC,
bootstrap_servers=KAFKA_URL,
security_protocol='SSL',
ssl_context=context,
)