我试图从firebase云函数发布一条json消息到发布子主题,我使用的是pubsubVersion0.19.0。
我得到了这个错误:
google/pubsub/v1/pubsub.proto could not be found in /protos
at Function.GrpcClient._resolveFile (/srv/node_modules/google-gax/lib/grpc.js:174:9)
at GrpcClient.loadProto (/srv/node_modules/google-gax/lib/grpc.js:162:33)
a
我正在做物联网项目,我需要在我的app.js文件中使用@google-cloud/pubsub npm模块!我想使用Node.js 13.6.0作为带有ECMAScript模块的Node.js版本! // TypeError: PubSub is not a constructor
import PubSub from '@google-cloud/pubsub';
// SyntaxError: module does not provide an export name 'PubSub'
import { PubSub } from '@goo
我正试图从一个next.js应用程序中将消息发布到pubsub。
我正在通过来设置节点客户端并在pubsub仿真器上运行它,但是对于我尝试的所有方法,我都得到了以下错误:
Error: 12 UNIMPLEMENTED: Method not found: google.pubsub.v1.Publisher/GetTopic
at Object.callErrorFromStatus (/Users/ethan/Documents/code/refold-library/node_modules/@grpc/grpc-js/build/src/call.js:31:19)
a
我用pubsub应用程序写了一个简单的appEngine。查看appEngine日志时,我发现内存在不断增加和下降,并且不断重复出现。当我看着日志的时候。我得到了下面的错误信息。基本上我要做的是,我设置了一个cron任务来每分钟触发一次路由,express路由将把消息发布到pubsub。对于这个简单的任务,我看到内存使用量不断地从89MB增加到131MB,在下一个即将到来的触发器中它会失败。请建议我如何解决这个内存泄漏问题。
2018-07-22 10:51:00.266 IST
Exceeded soft private memory limit of 128 MB with 130 MB
我对Node.js的Node.js模块有个问题。我使用Docker和PubSub模拟器创建了一个本地环境。我能够发布一条消息并使用异步拉检索它(如这里所记录的:)。然而,当我试图使用同步拉()时,我一直有以下错误:
错误:无法加载默认凭据。浏览到以获得更多信息。在GoogleAuth。(/var/code/node_modules/google-auth-library/build/src/auth/googleauth.js:167:23) at next (本机)在实现的(/var/code/node_modules/google-auth-library/build/src/auth/
我当时正在阅读,由于某些原因,我无法让这段代码在没有问题的情况下在chrome- IE9工作环境中工作。
这是js:
$(document).ready(function() {
function DataBinder( object_id ) {
// Use a jQuery object as simple PubSub
var pubSub = jQuery({});
// We expect a `data` element specifying the binding
// in the form: data-bind-<object_id
我正面临订阅的问题,它抛出异常 No pubsub module applied for subscription index.js import Amplify from "@aws-amplify/core";
import PubSub from "@aws-amplify/pubsub";
import API from "@aws-amplify/api";
import config from "./aws-exports";
Amplify.configure(config);
PubSub.configure(
也许这不是正确的方法(对想法开放),但是如果不需要的话,我想关闭一些测试环境的pubsub。 注意:我并不是想使用一个假的pubsub服务(pubsub模拟器),但我希望web应用程序不会发布/订阅任何内容,除非选中isPubsubEnabled everywhere这样的标志。 我在考虑将这些方法存根出来,所以在node.js中 this.pubsub = new NoOpPubsub();
this.pubsub.topic('my-topic').publisher().publish(my-message); // no-op and no error 有什么想法吗?
我正在尝试将Node服务器中的数据写入到一个pubsub主题中,该主题将触发GCP Cloud Function。我的代码或多或少都是直接从GCP Pubsub tutorial中搬来的。 然而,当我发布的时候,我一直收到这个错误: (node:60085) UnhandledPromiseRejectionWarning: TypeError: l.topic(...).publish is not a function
at /Users/kb/Documents/coding/maple/dist/server.bundle.js:100:1697
at Layer.handle [a
无法使用pubsub组件将数据从products.So组件传递到Cartlist组件。我需要将list对象传递给Cart component.The产品组件,当单击Cart组件时,每个项目都必须作为道具传递给Cart组件,呈现一个products.So列表。
import React from 'react';
import PubSub from 'pubsub-js';
import Productlist from '../component/productlist';
import Addtocart from '../compo
我使用制作了一个nodejs应用程序。它在我的本地主机上运行得很好。当我试图在服务器中发布它时,这个问题会出现在生产中(模数)。您可以查看下面的错误。
Error: The hook `pubsub` is taking too long to load.
Make sure it is triggering its `initialize()` callback, or else set `sails.config.pubsub._hookTimeout to a higher value (currently 20000)
at tooLong [as _onTimeout] (/
我正在尝试使用rabbitmq-pubsub在vue.js中实现一个订阅者。
但是,通过执行以下操作
var Subscriber = require('rabbitmq-pubsub').Subscriber;
在终点站我看到
warning in ./node_modules/_colors@1.0.3@colors/lib/colors.js
127:29-43 Critical dependency: the request of a dependency is an expression
在浏览器控制台中是ee
"[WDS] Warnings while
我正在使用heroku运行一个node.js应用程序,该应用程序使用gcloud创建一个主题,然后订阅它。我使用的代码如下所示:
var gcloud = require('gcloud')({
keyFilename: 'pubsub_key.json',
projectId: 'pipedrivesekoul'
});
var pubsub = gcloud.pubsub();
//create a new topic
pubsub.createTopic('projects/pipedrivesekoul/my-new-
我使用Autobahn.js进行web套接字连接(我需要订阅套接字事件)。
对于检查套接字事件,我使用$timeout。但我认为,这是错误的,不正确的,不是最优的,我不想在控制器中使用$timeout,也许promises对我有帮助?如何在没有$timeout的情况下在控制器中捕获套接字消息?
app.factory('socket',['$rootScope',
function($rootScope) {
var pubsub = new ab.Session(
'wss://site.com/',
fun