我想知道确认PubSub消息(来自推送用户)的正确方式是什么,这是一个Firebase云函数。这是通过返回一个承诺来完成的吗? import * as functions from 'firebase-functions'
import * as admin from 'firebase-admin'
export const listener = functions.pubsub.topic('new_members').onPublish(async (message:any) => {
let data = {
name:
我有一个谷歌PubSub Node.js监听器冻结使用拉动的问题。 我使用以下流程: 1. PubSub client is created,
2. Subscription is fetched from the specified topic
3. Listeners are attached to "message" and "error" events. 一开始,它拉取大约500条消息并确认它们,但在那之后它就挂起了,队列中有超过1000条消息。我尝试定期重新启动监听器(removeListener/on),但它只获取很少的消息。重新启动应用程序后,它
我正在使用回调函数向google发送消息,该函数读取来自未来的消息id。使用以下代码:
"""Publishes multiple messages to a Pub/Sub topic with an error handler."""
import time
from google.cloud import pubsub_v1
# ...
publisher = pubsub_v1.PublisherClient()
topic_path = publisher.topic_path(project_id, topic_name)
d