I have a micro service that should consume from multiple topics.
I wonder what is better to implement:
1. One consumer that consume from a list of topicscluster, err := cluster.NewConsumer(BROKERS, GropuID, topicNames, config)
and then I have one go channel with switch case to handle proper logic per topic.
2.One consumer per topiccluster, err := cluster.NewConsumer(BROKERS, GropuID, topic_1, config)cluster, err := cluster.NewConsumer(BROKERS, GropuID, topic_2, config)
...
(or NewConsumerFromClient)
With N go channels (one channel per topic...)
?
I have a micro service that should consume from multiple topics. I wonder what is better to implement:
1. One consumer that consume from a list of topics
cluster, err := cluster.NewConsumer(BROKERS, GropuID, topicNames, config)
and then I have one go channel with switch case to handle proper logic per topic. 2.One consumer per topiccluster, err := cluster.NewConsumer(BROKERS, GropuID, topic_1, config)
cluster, err := cluster.NewConsumer(BROKERS, GropuID, topic_2, config)
... (or NewConsumerFromClient) With N go channels (one channel per topic...) ?