Consider the following scenario. I have a Kafka broker for shock absorption and a lot of clients, who send me user1.rar files, divided into files user1.r01, user1.r02... (128KB each). The consumption into one topic works quite good as expected. The problem is that I need to unpack the files downstream the topology and stream the unpacked result to the final storage.
The bad part is that I do not have a operational storage to store all rars for one user. Is there any way in kafka to streamline files in one topic, so I can do stream unpacking. I am quite afraid that if
- I use one consumer, I will overwhelm its RAM, once 1000 of users starts streaming and the rXX files will get mixed up in the topic
- If I use multiple consumers, I do not think that kafka has "smart routing", so I can read in one consumer only some keys (related to one user/group of users) + how I will do rebalancing + reset, when one of consumers dies...
Is there any pattern, how to deal with this situation?
Thanks!