【问题标题】:Get object notification for Google firestore using pub/sub使用 pub/sub 获取 Google Firestore 的对象通知
【发布时间】:2020-06-23 15:01:31
【问题描述】:

我知道,当使用云功能在云 Firestore 中上传/修改文件时,我们可以将消息发布到 pubsub 主题。

有没有类似的方法可以在不使用 Cloud Functions 的情况下完成,就像我们为 gcs 所做的那样, “gsutil 通知创建 -t [pubsub_TOPIC_NAME] -f json -e OBJECT_FINALIZE gs://[BUCKET_NAME]”。这样无论何时上传/修改文件,我的订阅者都会收到通知。

感谢任何帮助!!!

【问题讨论】:

    标签: firebase google-cloud-platform google-cloud-firestore google-cloud-storage google-cloud-pubsub


    【解决方案1】:

    Firestore 没有类似的机制。您必须使用 Cloud Functions 触发器来了解文档的创建、更新或删除时间。如果需要,该触发器可以向 pubsub 主题发送消息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-06-20
      • 2020-03-27
      • 2018-10-08
      • 2021-11-19
      • 2017-09-07
      • 2017-09-12
      • 2021-12-12
      相关资源
      最近更新 更多