- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我希望使用 Dataflow 将事件从 PubSub 流式传输到 BigQuery。我发现 GCP 中有两个模板可以执行此操作:一个是 Dataflow 从主题读取消息;另一个是 Dataflow 从主题中读取消息。以及订阅中的一份。
在这里使用订阅比仅使用主题中的事件有什么优势?
最佳答案
Core concepts
Topic: A named resource to which messages are sent by publishers.
Subscription: A named resource representing the stream of messages from a single, specific topic, to be delivered to the subscribing application.
根据核心概念,区别相当简单:
当您想要将 Dataflow 中的消息发布到 Pub/Sub(事实上,对于给定主题)时,请使用主题。
当您想要在 Dataflow 中使用来自 Pub/Sub 的消息时,请使用订阅。
因此,根据您的情况,请进行订阅。
更多信息:
请注意,Pub/Sub 使用自己的消息存储来管理主题。不过,当您还想在 BigQuery 中移动这些消息(并最终执行您自己的分析)时,Cloud Pub/Sub 主题到 BigQuery 模板特别有用。
The Cloud Pub/Sub Topic to BigQuery template is a streaming pipeline that reads JSON-formatted messages from a Cloud Pub/Sub topic and writes them to a BigQuery table. You can use the template as a quick solution to move Cloud Pub/Sub data to BigQuery. The template reads JSON-formatted messages from Cloud Pub/Sub and converts them to BigQuery elements.
https://cloud.google.com/dataflow/docs/guides/templates/provided-streaming#cloudpubsubtobigquery
免责声明:评论和意见是我自己的,而不是我的雇主的观点。
关于google-cloud-platform - Dataflow 是否应该使用来自 Pub/Sub 主题或订阅的事件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56295345/
我创建了一个训练作业,我从大查询中获取数据、执行训练和部署模型。我想在这两种情况下自动开始训练: 向数据集添加了 1000 多个新行 有时间表(例如,每周一次) 我检查了 GCP Cloud Sche
我遇到以下警告: WARNING: You do not appear to have access to project [$PROJECT] or it does not exist. 在本地运行
我正在使用 Google Cloud Platform,我必须使用 java 非 Web 应用程序访问云功能,就像我尝试使用 Google Cloud Storage JSON API 从 Googl
我的问题是第三方开发人员如何通过我的身份平台登录用户?我查看了文档,但一无所获。 本质上,我想将 Identity Platform 用作 OIDC 提供者,但我不知道这是否受支持。 最佳答案 Clo
在我去这里的过去 12 个小时左右: https://console.developers.google.com/apis/credentials?project=MYPROJECTNAME 我只是得
我正在尝试创建一个 python 脚本来在 linux 机器上自动安装和配置某些程序。 我的想法是使用平台和多处理库来询问系统信息(platform.system、platform.linux_dis
我正在尝试创建没有控制台网页的 Google Cloud Platform 项目,因为我考虑创建多个项目。 因为我查了gcloud,目前只支持project describe和list。 https:
我正在使用 Google Cloud Scheduler 调用外部应用程序。 Google Cloud Scheduler 使用 OIDC 身份验证并使用服务帐户。我只能从 Google 服务帐户 U
如何在我的 Google Cloud Platform 帐户上启用 Google Authenticator 双重身份验证?我在 Web 界面中上下查看了“IAM 和管理员”,但没有看到在帐户上启用
我们在 Google Cloud 上设置了一个虚拟机,并希望能够自动或计划打开和关闭它。 我们内部有自动脚本,之后可以完成工作,到目前为止,我在 google 的文献中读到的更多与这些实例有关,但我找
我试图删除一个 GCP 项目,但不断弹出以下错误。 Lien origin You cannot delete this project because it is linked with a Dia
我从 Google Domains 购买了一个域,称为 example.com。 我已订阅 G Suite 基本版并创建了一个 admin@example.com 帐户以在 GCP 上使用,而不是我的
我构建了一个包含许多并行进程的 AI Platform 流水线。每个流程都会在 AI Platform 上启动一个训练作业,如下所示: gcloud ai-platform jobs submit t
我们正在验证函数输入时方法参数不为空,但这不适用于 Platform::String (或 Platform.String ,C# 或 C++ 之间没有区别),因为它们用空实例重载空字符串的语义。 考
这个问题比我想来这里的问题要简单一些,但我一直在努力寻找答案,但我绝对不能—— 谷歌云平台 HTTP 函数是否支持路由参数,如此处? http://expressjs.com/en/guide/rou
我正在使用 Kubernetes,我正在尝试创建一个 ingress resource .我使用以下方法创建它: $ kubectl create -f my-ingress.yaml 我等了一会儿,
我是 Google Cloud 的新手,所以我希望得到一些有关“组织”的指导。 我可以将项目从一个“组织”转移到另一个“组织”吗?我正在我的个人 GSuite 组织下启动一些项目,但我必须将它们转移到
在 GET 操作中,我想从返回的集合中排除具有等于“true”的“存档”字段的实体。 我希望这是我的端点(如/users 或/companies)的默认设置,并且我想避免手动添加 URL 过滤器,如
实例模板对于创建托管实例组至关重要。事实上,托管实例组对于在 GCP 中创建自动扩缩组至关重要。 这个问题是另一个问题 question's answer 的一部分,这是关于构建一个自动缩放和负载平衡
我正在将 GCP 用于多个相同的项目。对于每个新项目我都需要一个1 个 GPU 的配额(Tesla K80)。为了申请增加我的GPU配额,我打开console并导航至“IAM 和管理”>“配额”。我在
我是一名优秀的程序员,十分优秀!