
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
pubsub-subscriber
Advanced tools
An opinionated GCP Pub/Sub subscriber we use here at [Namshi](https://github.com/namshi).
An opinionated GCP Pub/Sub subscriber we use here at Namshi.
let {subscribe} = require('pubsub-subscriber')
// name of the topic you want to listen to
let topic = "my_topic"
// name of your subscription, will be created automagically
let subscription = "my_topic_send_email"
// function that processes the message:
// payload will be the JSON parsed.
//
// Return to ack, throw an exception to nack.
async function onMessage(payload, options) {
if (payload.ok) {
return
}
// options.message - the original message object from the pubsub SDK
// options.topic_name - the topic you've subscribed to
throw new Error("I f'ed up")
}
subscribe(topic, subscription, onMessage)
That's it!
FAQs
An opinionated GCP Pub/Sub subscriber we use here at [Namshi](https://github.com/namshi).
The npm package pubsub-subscriber receives a total of 0 weekly downloads. As such, pubsub-subscriber popularity was classified as not popular.
We found that pubsub-subscriber demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.