I have two Kafka consumer ConsumerA
and ConsumerB
. I want to run these two kafka consumers independent of each other on the same machine. There is
Try Apache Samza. It solves these consumer problems. No messy (and sometimes problematic) handling of threads, redundancy via clustering, proven solution by trillions of proven processed mesages, etc. We are currently running more than one job on the cluster. Our code is much less complex than what you have here.