apache kafka – One or many consumer groups?

I have a topic called Users in my Broker. My app will write in this topic new “messages” as new customers decide to make accounts in my app. My app is collaborating with some institutions, so that my app will inform each of them about the new users. Therefore I consider the institutions as consumers. My app needs to inform the institutions about all my users, so that after that, each institution will inform me if and what taxes each of my users have to pay to them.

I considered 2 ways of designing this case:

  1. Each institution will be a different consumer group which will have one consumer inside.
  2. Each institution will be a different consumer, but all will be inside the same consumer group.
    I understood that for the first way I will need to have more partitions in my topic, and for the second way the problem of high concurrency may appear.

Obs: As new institutions decide to join my app and collaborate with my app, they will be added as new consumers inside the Kafka system.

This is for the first way
enter image description here

This is for the second way
enter image description here

Read more here: Source link