I am writing a Python application. It reads off a kafka topic using a consumer. With each message, it does some stuff that can take a while to complete before doing some stuff with the next message.
Most applications using multiprocessing library involve passing some finite iterable to map_async or apply_async. My attempts to solve this problem using these two functions don't seem to work, I think because our iterable in this case is the kafka topic, which is an unbound queue. Is there a way to 'do some stuff' in a non-blocking manner in this kind of scenario?