import asyncio from AgenticInterfaces.KafkaClient import KafkaClient bootstrap_servers = "kafka:9092" request_topic = "request_llm_topic" async def send_periodic_messages(): kafka_client = KafkaClient(topic=request_topic, bootstrap_servers=bootstrap_servers) await kafka_client.start() try: while True: message = {"text": "Пример сообщения"} await kafka_client.send_message(message) await asyncio.sleep(5) finally: await kafka_client.stop() asyncio.run(send_periodic_messages())