Have a few design questions, would appreciate feedback based on your experiences with Kafka and KafkaJS(any such library):
- Is partition a way to scale in Kafka? If I create 3 partitions and only 1 consumer, do I loose messages with those 2 non utilized partitions? And if I spin up 2 new consumers, does KafkaJS manage the assignment for new consumers from dedicated partitions?
Is
eachBatch
the only way to implement parallel processing in consumers, can it be done with eachMessage and control the rate of messages to process? - What is the recommended way to scale consumers? Partition/Async Parallel/Increase consumer nodes, etc.? Currently, I have 1 node consuming ~30 messages per min, my goal is to scale the consumer because the expected rate could be around ~2000 upwards.