Reputation: 437
I am working on a distributed highly scalable application using Google Pub/Sub as message broker. While going through the articles, I liked the subscription filter feature of pub/sub.
I was thinking of having a single topic with multiple subscriptions. Multiple publishers would publish discrete messages to the same topic. Each subscription would use attribute filter to pull messages specific to its requirement.
Does anyone know the drawback of using pub/sub subscription filters? Should I go ahead with this approach of single topic or create separate topics for each message type?
Upvotes: 4
Views: 4192
Reputation: 17261
The choice between multiple subscriptions with filters or multiple topics comes down to a few things:
List<Object>
in Java where every item is a different subclass.Upvotes: 9