
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@socket.io/gcp-pubsub-adapter
Advanced tools
The Socket.IO adapter for Google Cloud pub/sub, allowing to broadcast events between several Socket.IO servers
The @socket.io/gcp-pubsub-adapter
package allows broadcasting packets between multiple Socket.IO servers.
Table of contents
Feature | socket.io version | Support |
---|---|---|
Socket management | 4.0.0 | :white_check_mark: YES (since version 0.1.0 ) |
Inter-server communication | 4.1.0 | :white_check_mark: YES (since version 0.1.0 ) |
Broadcast with acknowledgements | 4.5.0 | :white_check_mark: YES (since version 0.1.0 ) |
Connection state recovery | 4.6.0 | :x: NO |
npm install @socket.io/gcp-pubsub-adapter
import { PubSub } from "@google-cloud/pubsub";
import { Server } from "socket.io";
import { createAdapter } from "@socket.io/gcp-pubsub-adapter";
const pubsub = new PubSub({
projectId: "your-project-id"
});
const topic = pubsub.topic(topicNameOrId);
const io = new Server({
adapter: createAdapter(topic)
});
// wait for the creation of the pub/sub subscription
await io.of("/").adapter.init();
io.listen(3000);
Name | Description | Default value |
---|---|---|
subscriptionPrefix | The prefix for the new subscription to create. | socket.io |
subscriptionOptions | The options used to create the subscription. | - |
heartbeatInterval | The number of ms between two heartbeats. | 5_000 |
heartbeatTimeout | The number of ms without heartbeat before we consider a node down. | 10_000 |
FAQs
The Socket.IO adapter for Google Cloud pub/sub, allowing to broadcast events between several Socket.IO servers
We found that @socket.io/gcp-pubsub-adapter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.