I'm planning to build a critical component which produces the messages to kafka. I'm just thinking, is there any way that python multithreading will help us in writing the efficient kafka producer with asyncio, multithreading ?
Also here I'm planning to create a thread on demand, the use case is like kafka producer script needs to consume the textfiles and produce it kafka (catch here is, this needs to be done on demand). Design will be like, kafka producer script will read the ondemand request from redis/rabbitmq queue, once we got the request, I'm planning to create a thread for each request. request contain which textfile to read and send.
Is it possible to implement in python using multithreading and asyncio ? any help on this appreciated. thanks