How to wire/configure two pubsub gcp projects in one spring boot application with spring cloud?

前端 未结 1 563
悲哀的现实
悲哀的现实 2021-01-28 02:03

Currently, we\'re working on a spring boot application in a GCP project, which connects to a PubSub endpoint in the same GCP project, but also to a PubSub endpoint in anothe

1条回答
  •  走了就别回头了
    2021-01-28 02:43

    Considering correct privileges for another project,you can publish/subscribe to topics in different projects with a fully qualified topic/subscription name

    eg. for topic publish pubSubTemplate.publish("projects/other-project/topics/the-topic", "payload").

    This should be available with the latest spring-cloud-gcp version. Please see this issue for more details.

    0 讨论(0)
提交回复
热议问题