【发布时间】:2017-06-18 18:44:50
【问题描述】:
我们的 Java 应用在 Google App Engine 上运行。它使用 Google 的 PubSub 来发布和使用消息。
Google PubSub 有两个 Java 客户端。建议使用 gRPC 客户端,但如本页底部所述,Google App Engine 不支持 https://cloud.google.com/pubsub/grpc-overview。
另一个库是 Google Cloud Pub/Sub API Client - https://developers.google.com/api-client-library/java/apis/pubsub/v1
使用 gRPC 客户端库时,很容易使用 pubsub 模拟器。只需设置一个环境属性即可。
PubSub API 客户端是否可以与 Google PubSub 模拟器一起使用?
在本地运行我们的应用程序时,我们的目标是能够使用 PubSub 模拟器,而不是连接到云中的实时实例。
【问题讨论】:
标签: google-app-engine google-cloud-pubsub