简体   繁体   English

GCP PUB/SUB 允许不同的项目发布到一个主题

[英]GCP PUB/SUB allow different projects to publish to a topic

Lets say there are Projects A, B and C. I have created a topic "my-topic" in project A. Now I want the project B and C to publish some data onto the topic "my-topic".假设有项目 A、B 和 C。我在项目 A 中创建了一个主题“my-topic”。现在我想让项目 B 和 C 将一些数据发布到主题“my-topic”上。 Ideally, I want to publish the log data of project B and C onto the topic created in project A. Can this be even possible?理想情况下,我想将项目B和C的日志数据发布到项目A中创建的主题上,这是否可能?

Give roles/pubsub.publisher role to the Topic in Project A to the service accounts of Project B and C.将A项目中Topic的roles/pubsub.publisher角色赋予B项目的服务账号和C。

You can achieve this in different manner.您可以通过不同的方式实现这一目标。

Firstly, the logs have project boundaries.首先,日志有项目边界。 You can't view the logs in one place for all projects.您无法在一个地方查看所有项目的日志。

However you can export the logs (perform a custom/advance query to get only the relevant log lines) in a common place with the sinks .但是,您可以将日志导出到公共位置(执行自定义/高级查询以仅获取相关的日志行)。

  • Sink the logs into BigQuery to perform request and find insight in them将日志汇入 BigQuery 以执行请求并从中找到见解
  • Sink the logs in PubSub for real time processing将日志下沉到 PubSub 中进行实时处理
  • Sing the logs into CLoud Storage file, for (legal) archiving将日志写入 CLoud Storage 文件,用于(合法)归档
  • Sink the logs into CLoud Storage or Splunk for an external usage and ingestion.将日志汇入 CLoud Storage 或 Splunk 以供外部使用和摄取。

Is it enough for you?对你来说够了吗?

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

相关问题 如何允许从前端 web 应用程序公开/未经身份验证的发布到我的 GCP 发布/订阅主题? - How do I allow public/unauthenticated publish to my GCP pub/sub topic from front-end webapp? 我可以配置 GCP ops-agent 以将日志发送到其他项目或将日志发布到 Pub/Sub 主题吗? - Can I configure GCP ops-agent to send logs to other project or publish logs to Pub/Sub topic? 发送到在创建订阅之前存在的主题的 GCP Pub/Sub 消息 - GCP Pub/Sub Messages sent to topic that existed before the subscription was created 为什么 GCP Pub/Sub 发布消息两次? - Why does GCP Pub/Sub publish a message twice? GCP 发布/订阅优先级队列 - GCP Pub/Sub priority queue 为什么 GCP Pub/Sub 消息具有重复的 message_id 和 publish_time 值? - Why do GCP Pub/Sub messages have duplicated message_id and publish_time values? 当通过 GKE POD 内的 Cron 执行时,无法使用 Python SDK 将消息发布到 GCP Pub/Sub - Unable to publish messages to GCP Pub/Sub using Python SDK when executed via Cron inside a GKE POD BigQuery 表订阅的 Pub/Sub 主题 - Pub/Sub Topic to BigQuery Table Subscription 如何在 Google Pub/Sub 主题架构中声明可选字段? - How to declare an optional field in Google Pub/Sub Topic Schema? gcp 签名的 url 是否与 google pub/sub 一起使用? - does gcp signed url work with google pub/sub?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM