Cloud pubsub notification to all subscribers?

50 views
Skip to first unread message

Vinay Chitlangia

unread,
Apr 10, 2017, 3:41:29 AM4/10/17
to Google App Engine
Hi, 
Wondering if the pubsub notification on a topic, goes to all subscribers listening to the topic or only one. Couldnt find a definitive answer in any doc yet.

Suppose I have a topic say
a)  /topic/invalidate-local-cache. Now if I have servers with say 20 replicas, this is a notification that I would like to go to each of the 20 server.
b)  /topic/send-mail-to-user. In this case, I would want only one of the replica to receive the notification.

Is it possible to setup different topics, some with a) and some with b)

I am using flex, which may or may not impact the answer:)

Jun (Cloud Platform Support)

unread,
Apr 10, 2017, 4:09:13 PM4/10/17
to Google App Engine
Hi Vinay,

Once you have your subscriber applications setup to create a subscription to a topic to receive messages from it, then it should be good given that the communication can be one-to-many, many-to-one or many-to-many [1]. To be more specific, you will expect your subscribers (20 replicas as you mentioned) to receive messages from '/topic/invalidate-local-cache' once you've setup the subscriptions to it. On the other hand, you will also expect only one of the replicas receive message from '/topic/send-mail-to-user' only if you subscribe this specific replica to receive message from it. 


Jun
Reply all
Reply to author
Forward
0 new messages