Want to know best way for below case.
In micro services project: one application (producer) is publishing message and these messages are being consumed by many other downstream applications. Some messages are for 1st application, some are for 2nd, some are for 3rd and so on. What would be the best way so consumers consume only those messages which are meant for them.
Should I have 1 topic and number of partitions equal to no. of consumer and use key while publishing the message so each partition will be used by one particular consumer.
or 1 topic for each consumer and 1 partition or mutiple partition in each topic?
We should also consider if number of consumer increases in future then our solution should be able to handle it easily.