4

In the Google Cloud Pub/Sub documentation about load balancing in pull delivery say:

Multiple subscribers can make pull calls to the same "shared" subscription. Each subscriber will receive a subset of the messages.

My concern is about the last phase. Can I decide the way to partition the topic? In others words, Can I decide the way the subsets are grouped?

For instance, in the Kinesis AWS service I can decide the partition key of the stream, in my case by user id, in consequence, a consumer recibe all the messages of a subset of users, or, from other point of view, all the messages of one user are consumed by the same consumer. The message stream of one user is not distributed between different consumers.

I want to do this kind of partition with the Google Pub/Sub service. Is that possible?

1 Answer 1

5

There is currently no way for the subscriber to specify a partition or set of keys for which they should receive messages in Google Cloud Pub/Sub, no. The only way to set up this partition would be to use separate topics.

1
  • 1
    What would be idiomatic way of sharding data of a single PubSub topic?
    – expert
    Feb 17, 2020 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.