I have Django app which should consume Kafka messages and handle it with my handlers and existing models.
I use https://kafka-python.readthedocs.io/en/master/usage.html library.
What is the right way to connect KafkaConsumer to Django app. Should I user a new daemon thread? Or a new process? Or a separate docker container maybe?
Where to place the code (new Django app?) and how to start it automatically when Django app is ready. And how to update topics which it listen dynamically: should I kill old consumer and start new one each time in new thread?
Source: Docker Questions