We have the following scenario in an SOA application. ServiceA produces some jobs which need to be processed by instances of ServiceB asynchronously. Essentially, this translates to a Work Queue problem where each worker is an instance of ServiceB. We are using Kafka as the message broker and have the following setup.
5 Brokers B1,B2,B3,B4 and B5. There is a topic(A) with 10 partitions (P1,P2,....P10) each with a replication factor of 3. Lets assume that the partition assignment is as follows P(i) has B(i) as leader and B(i+1) and B(i+2) as replicas.
There are 3 instances of ServiceB running. Given this setup, how should we use the High Level Consumer API to achieve the consumption model C1 consumes from 3 partitions; C2 from 3 partitions; C3 from remaining 4 partitions