简体   繁体   English

客户端库中基于全局的流控制发布/订阅

[英]Flow control pub/sub on global basis in client library

In the client library for Cloud Pub/Sub, we can specify flow control settings in order to ensure the subscriber is not being overwhelmed by messages.在 Cloud Pub/Sub 的客户端库中,我们可以指定流控制设置,以确保订阅者不会被消息淹没。 This works fine if you only have one subscription.如果您只有一个订阅,这可以正常工作。

However, my server has many subscriptions, which are used to integrate with other services.但是,我的服务器有很多订阅,用于与其他服务集成。 Is there a way to enforce a global flow control of sorts in the client library, which would make it possible to evenly balance the flow of messages among the subscription instances?有没有办法在客户端库中强制执行各种类型的全局流控制,从而可以均匀地平衡订阅实例之间的消息流?

I tried looking at the docs, and did some searching, but came up empty handed.我尝试查看文档,并进行了一些搜索,但空手而归。

After some additional research, it seems that the only viable option to control the throughput more fine grained among multiple subscriptions, will be to use the lower-level api to perform synchronous pulls.经过一些额外的研究,似乎在多个订阅之间更细粒度地控制吞吐量的唯一可行选择是使用较低级别的 api 来执行同步拉取。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM