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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@simpleview/sv-pubsub-client

v1.0.13

Published

Client for communicating with Google Pub/Sub

Readme

sv-pubsub-client

Client for communicating with the Google Pub/Sub service.

Google Pub/Sub is the message broker typically used by microservices to communicate events that occur in one system to the other. These events are typically changes in data, e.g. accounts-update.

The most important concepts in Google Pub/Sub are Topics, Subscriptions and Messages.

Publishing a Message to a Topic without any Subscriptions will result in that message being lost. A Topic can and should be created by both Producers and Consumers of that Topic, to ensure that it exists before either end attempt to interact with it. Subscriptions are created from Topics.

These hold Messages, which Consumers consume via the persistent bidirectional connection it maintains with the Google Pub/Sub service. This is called a "streaming pull", not to be confused with polling/pull, which relies on the Consumer polling for new Messages on an interval.

Authorising with Google Pub/Sub

Authorisation should be done through service accounts. Each microservice typically has a service account. A service account will need permissions to create topics, subscriptions, attach to subscriptions and publish messages in order to authorise.

The credentials required are:

  • projectId, e.g. sv-shared-231700
  • credentials, i.e. the Application Default Credentials of your Google Service Account

Conventions

Topics should be named after the environment, producer, and event name of the events that pass through it. For example, if a Camber user updates an Account on the live app, we would be broadcasting that events to all Consumers of a Topic named live-camber-accounts-updated.

Subscriptions should be named after the consuming app, e.g. live-auth-live-camber-accounts-updated and set an appropriate retention period. Subscriptions are never automatically cleaned up, however the Messages stored within them are deleted after an hour, by default, although this can be changed.