A topic receives all the orders for the products that are available on a commerce site. Two applications want to process all the messages independently - order fulfilment and monitoring. The topic has 4 partitions, how would you organise the consumers for optimal performance and resource usage?
- Create 8 consumers in the same group with 4 consumers for each application
- Create two consumers groups for two applications with 8 consumers in each
- Create two consumer groups for two applications with 4 consumers in each
- Create four consumers in the same group, one for each partition - two for fulfilment and two for monitoring
Answer(s): C
Explanation:
two partitions groups - one for each application so that all messages are delivered to both the application. 4 consumers in each as there are 4 partitions of the topic, and you cannot have more consumers per groups than the number of partitions (otherwise they will be inactive and wasting resources)
Reveal Solution Next Question