I have a scenario where system A is going to get information from system B.
Options/Scenarios
B will send message to a topic for A to consume along with other consumers of the same topic Pros - for B things will be simple Cons - A has to consume all messages where many messages are not relevant to A
B will send message to a topic meant for only A to consume Pros - A will only get the messages that are relevant to A Cons - B has to send to a different topic meant only for A's use case
B will a rest API hosted by A Pros - A does not have to worry about message consumption Cons - B has to call API for one consumer A and this is not a scalable approach.
To give more information, in my case the messages relevant to A is very small in number compared to all messages that B sends to A
If the number of messages that A is interested in is very very less (say couple of 100s in x days) vs number of total messages published in the topic (few millions in x days) - then does it justify A to read all these from the topic as in option 1.
C should not sound good from the producer (B) perspective as B can not call API for every new consumer with similar need.
While I am working to find out better solutions (if any) would like to know other thoughts.
Updated below
Option 4 B will send message to a topic for A to consume along with other consumers of the same topic but with key that can be used as filtration/rejection by A.
Option 4 sounds a better one and will explore more.