nodejs-pubsub | js client for Google Cloud Pub | Pub Sub library

 by   googleapis TypeScript Version: v3.7.0 License: Apache-2.0

kandi X-RAY | nodejs-pubsub Summary

kandi X-RAY | nodejs-pubsub Summary

nodejs-pubsub is a TypeScript library typically used in Messaging, Pub Sub, Nodejs applications. nodejs-pubsub has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Cloud Pub/Sub is a fully-managed real-time messaging service that allows you to send and receive messages between independent applications. This document contains links to an API reference, samples, and other resources useful to developing Node.js applications. For additional help developing Pub/Sub applications, in Node.js and other languages, see our Pub/Sub quickstart, publisher, and subscriber guides. A comprehensive list of changes in each version may be found in the CHANGELOG. Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in Client Libraries Explained.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              nodejs-pubsub has a low active ecosystem.
              It has 478 star(s) with 228 fork(s). There are 56 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 29 open issues and 477 have been closed. On average issues are closed in 116 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of nodejs-pubsub is v3.7.0

            kandi-Quality Quality

              nodejs-pubsub has no bugs reported.

            kandi-Security Security

              nodejs-pubsub has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              nodejs-pubsub is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              nodejs-pubsub releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of nodejs-pubsub
            Get all kandi verified functions for this library.

            nodejs-pubsub Key Features

            No Key Features are available at this moment for nodejs-pubsub.

            nodejs-pubsub Examples and Code Snippets

            NodeJS GCloud Pub/Sub module,Usage,Subscribing to topics
            TypeScriptdot img1Lines of Code : 35dot img1License : Permissive (MIT)
            copy iconCopy
            import { NestFactory } from '@nestjs/core'
            import { GCloudPubSubServer } from 'nodejs-gcloud-pubsub-module'
            import { ApplicationModule } from './app.module'
            
            async function bootstrap() {
            	const app = await NestFactory.create(ApplicationModule)
            
            	cons  

            Community Discussions

            QUESTION

            Test Google Cloud PubSub emulator with a push subscription
            Asked 2019-Aug-30 at 15:43

            I'm trying to setup a GCP PubSub service that will work with a push type subscription. However it's impossible to create one in the developement stage, while I have no accessible endpoints.

            I assumed that the emulator would allow me to specify a local endpoint so that the service would run flawlessly in local.

            However, after setting it up, I couldn't find a way in the Node.js pubsub library to create a subscription while specifying its options, there is no example for this.

            This is the pretty simple way to create a simple, default, pull, subscription:

            ...

            ANSWER

            Answered 2019-Aug-30 at 15:43

            Here is an example of how you would set up push subscription. It is the same as how you would set it up if you were running in the actual Pub/Sub environment. Specify ‘pushEndpoint’ as your local endpoint. When running on the emulator, it will not require authentication for your endpoint.

            You can do something like the following:

            Source https://stackoverflow.com/questions/57628105

            QUESTION

            google cloud pubsub node.js client not compatible with google cloud functions
            Asked 2018-Jul-22 at 17:30
            Architecture:

            We have an architecture using 2 pubsub topic/subscription pairs:

            • Topic T1 is triggered by a cronjob periodically (every 5 minutes for example). Subscription S1 is the trigger for our cloud function.
            • Topic T2 serves as a queue for background jobs that are published by one of our services. Subscription S2 is read by the cloud function on each execution to service the queued background jobs.

            This allows us to control the frequency the background jobs are serviced independent of when they are added to the queue.

            The cloud function (triggered by S1) reads messages from S2 by pulling. It decides which background jobs are ready and upon successfully servicing the job, it ACK's the associated messages. Jobs not ready or failed are not ACK'ed to be serviced later.

            Issue:

            We have issues using the official node.js pubusb client from google:

            1. Sometimes ACK'ed messages re-appear (seeming infinitely). We verified the messages are acked before the ACK deadline and are sure we are calling ack() by investigating our logs.
            2. Sometimes after the first execution (after re-deploying the function), subsequent executions never receive new messages. We can verify the messages are queued in subscription S2 either by verifying the unacknowledged message count in stackdriver or by re-deploying the function and seeing the messages getting serviced.

            We believe this is a problem with google's node.js pubsub client. The cloud function docs clearly state not start background activities. However, looking into the node.js pubsub client source, it clearly services acknowledgements in the background using timeouts.

            Is google's node.js pubsub client not compatible with google cloud functions? Google recommends accessing the service API's only when a client library does not exist or does not meet other needs. Is running the client in a cloud function "other needs", requiring us to write our own client using the service API's?

            Workaround attempted:

            As a "workaround" we tried delaying the end of the execution of the cloudfunction to allow any "background" processes in the node.js pubsub client to complete, but this did not consistently eliminate our issue. It seems that pubsub client is not cloud function friendly and cannot recover from being stopped in between cloud function executions.

            Update Feb. 22, 2018

            I wrote an article on our blog that describes in detail why we used PubSub in this way and how we are working around the fact that node.js pubsub client is not compatible with cloud functions.

            ...

            ANSWER

            Answered 2018-Feb-22 at 13:30

            A developer from the node.js pubsub client confirmed that using the client to pull messages from a Cloud Function is not a supported use case.

            The alternative is to use the service APIs. However, the REST APIs have their own caveats when attempting to pull all messages from a subscription.

            Source https://stackoverflow.com/questions/48623991

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install nodejs-pubsub

            You can download it from GitHub.

            Support

            Our client libraries follow the Node.js release schedule. Libraries are compatible with all current active and maintenance versions of Node.js. If you are using an end-of-life version of Node.js, we recommend that you update as soon as possible to an actively supported LTS version.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/googleapis/nodejs-pubsub.git

          • CLI

            gh repo clone googleapis/nodejs-pubsub

          • sshUrl

            git@github.com:googleapis/nodejs-pubsub.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Pub Sub Libraries

            EventBus

            by greenrobot

            kafka

            by apache

            celery

            by celery

            rocketmq

            by apache

            pulsar

            by apache

            Try Top Libraries by googleapis

            google-api-nodejs-client

            by googleapisTypeScript

            google-api-php-client

            by googleapisPHP

            google-api-python-client

            by googleapisPython

            google-cloud-python

            by googleapisPython

            google-api-go-client

            by googleapisGo