Can a subscriber select messages based on publisher?

334 views Asked by At

My question is related to this description of the pub/sub message flow from The Basics of a Publish/Subscribe Service:

enter image description here

The description apears to suggest that it's possible for a subscriber to only receive some of the messages hitting a subscription point: Subscriber 1 appears to be getting just the B message and Subscriber 2 getting just the A message, despite the fact that both A and B messages are coming from Subscription 1.

Nowhere else in the docs I encountered such concept, message receiving appears to be done based on particular subscription and a subscription appears to be done for a particular topic, but not for a particular publisher.

Am I misinterpreting the above description or is it really possible for a subscriber to select only some of the messages it receives (based on the publisher)?

1

There are 1 answers

1
Kamal Aboul-Hosn On BEST ANSWER

The subscribers themselves do not choose which messages they get. When there are multiple subscribers for a single subscription, they can both pull from the same subscription and receive an arbitrary subset of the messages. This can be used to load balance across multiple subscribers and process more messages in parallel by increasing the number of subscribers.