npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-bpm-events

v1.0.0

Published

Node-RED nodes for BPM Events based on Google Cloud PubSub Platform

Downloads

3

Readme

node-red-contrib-bpm-events

This is a BPM (Business Process Management) event system based on Google Cloud Pubsub.

This project is based on a non official Google product Node Red nodes for Google Cloud Platform.

This is not an official Google product.

Node-RED nodes for Google Cloud Platform.

Installation

There are multiple ways to install node-red-contrib-google-cloud. The official ways are described in the Node-RED documentation.

Google Cloud Credentials

| Property | Type | Description | | ----------- | -------- | ---------------------------------------------------- | | name | string | Label for easy idetification, essentially a comment. | | account | string | Credentials in the form of a JSON key. |

The credentials for a service account can be acquired from the API Manager. After you finish creating a service account key it will be downloaded in a JSON format. Copy and paste the contents of the file directly into the Key field in the node editor.

Step 1

Step 2

Step 3

Google Cloud Pub/Sub

Before You Begin

  1. Select or create a Google Cloud project.
  2. Enable billing for your project.
  3. Enable the Pub/Sub API.

Example

Create a new flow or if this is your first flow use the default one. Next drag and drop the pubsub input node onto the workspace. Then double-click the node you just placed. Click the button with the pencil icon next to input field that says Add new google-cloud-credentials.... A new pane should appear with a Name and Key input field. The name can be anything you like. The key must be the service account key. Refer to Google Cloud Credentials on how to obtain the key. After clicking done you will be returned to the previous pane. Fill in the Topic input field with an existing or new topic name and click done.

Step 1

Next drag and drop the pubsub output node onto the workspace. Then double-click the node you just placed. The Credentials input field will be automatically filled with the credentials you created previously. Fill in the Topic input field with the same name you used previously and click done.

Step 2

We now have our input and output nodes, but we need some data. The easiest way to do this is using the inject input node with static data. Drag and drop the inject input node onto the workspace. Then double-click the node you just placed. Change the Payload type to string and fill in the Payload input field with some text, like Hello World!. Lastly change the Repeat type to interval and click done.

Step 3

At this point we need some way to view the data from the pubsub input node to make sure things are working. The easiest way to accomplish this is to use the debug output node. Drag and drop the debug output node onto the workspace. The default configuration will do with this node, but feel free to modify it.

Step 4

Lastly we need to wire everything up. Connect the inject input node to the pubsub output node and the pubsub input node to the debug output node as shown below.

Step 5

Click deploy. If everything goes well the pubsub nodes should change their status to connected and/or publishing. Switch to the debug pane on the right side to view the payload.

Step 6

Input

Node Properties

| Property | Type | Description | | -------------------------- | -------------------------- | ---------------------------------------------------------------------- | | account | google-cloud-credentials | See Google Cloud Credentials | | topic | string | Name of the topic to subscribe to. | | subscription | string | Name of the subscription to create. If null one will be autogenerated. | | ackDeadlineSeconds | integer | Number of seconds to wait before attempting to redeliver a message. | | encoding | string | Underlying encoding of the payload. Defaults to 'utf-8'. | | interval | integer | Number of milliseconds between polling for messages. | | timeout | integer | Number of milliseconds before giving up on an HTTP request. | | name | string | Label for easy identification, essentially a comment. |

Message Properties

| Property | Type | Description | | --------------------------- | ------------- | ---------------------------------------------------------------------------------------- | | payload | string | The payload passed as-is from the PubSub message. | | time | date | The timestamp converted to the number of milliseconds since 1 January 1970 UTC. | | project | string | The name of Google Cloud Platform project. | | topic | string | The name of the topic in Google Cloud Platform. | | subscription | string | The name of the subscription in Google Cloud Platform. | | resource | string | The URI of the resource in the form of /projects/project/subscriptions/subscription. |

Output

Node Properties

| Property | Type | Description | | ------------| -------------------------- | --------------------------------------------------------- | | account | google-cloud-credentials | See Google Cloud Credentials | | topic | string | Name of the topic to publish to. | | name | string | Label for easy identification, essentially a comment. |

Message Properties

| Property | Type | Description | | ----------- | ------------- | --------------------------------------------------------------------------------- | | payload | string | The payload passed as-is to the PubSub message. | | time | date | The timestamp converted from the number of milliseconds since 1 January 1970 UTC. |

Troubleshooting

After installing node-red-contrib-google-cloud the nodes are missing from the interface, where are they?

Refer to the Node-RED documentation for adding nodes. If you used one of the methods described there and are still have trouble try modifying the Node-RED configuration with a more verbose logging level and run Node-RED from the terminal, if you are not already. See the running Node-RED article for different ways of starting Node-RED.

After installing node-red-contrib-google-cloud the logs contain errors about not finding the grpc_node.node module, what gives?

This issue usually comes up after installing node-red-contrib-google-cloud globally i.e. sudo npm install -g node-red-contrib-google-cloud. Some versions dislike running install scripts as the root user and will silently fail to run the script, making the installation appear successful when in reality it failed. See this issue for more details. The solution is to run the installation again, but append --unsafe-perm to the command i.e. sudo npm install -g node-red-contrib-google-cloud --unsafe-perm.