3 ms·
"Batched calls are accounted for as multiple operations." - https://cloud.google.com/pubsub/pricing https://cloud.google.com/pubsub/pricing
by foota 11y ago
"Batched calls are accounted for as multiple operations." - https://cloud.google.com/pubsub/pricing https://cloud.google.com/pubsub/pricing
- deleted 11y ago[deleted]
- sharpy 11y agoRight. If you look at the API, the publish API allows you to push multiple messages in a single API call, and if that is the batching - publishing multiple messages - then yes, you and others are absolutely correct that there is no cost benefit. But rather than publishing { "messages" : [ { message 1 }, { message 2 } ] } You publish { "messages" : [ { container message containing both, still less than 64k } ] } Then you've reduced your operations count by half. Cloud services like this have a per message overhead, for things like auditing and delivery tracking, which is why the pricing model is what it is. If you are ok with having to unpack and process multiple messages at once as I've described, then it's a way to optimize against the pricing model.
- Gigablah 11y agoHe's talking about a single call containing multiple messages in their own serialization format.