Redis pubsub for communicating other nodes in a distributed system, enabling request-response pattern across instances. Current stable version is 1.0.2. Release cadence is low (last release on npm). Key differentiators: built on node-redis and redis-cluster for cluster support; provides a hook mechanism to collect and aggregate data from all nodes; includes namespace support for scoped pubsub channels.
npm install redis-pubsub-hookNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a RedisPubSub instance, sets a hook, and makes a request to collect responses from all nodes.
Use 'redis://host1:6379,host2:6379' for cluster mode.
Set a higher timeout in options if needed.
Use redis v3 for compatibility; the library does not support redis v4.
Use separate Redis databases or unique channel prefixes.
Use 'import { RedisPubSub } from 'redis-pubsub-hook'' or 'const { RedisPubSub } = require('redis-pubsub-hook')'Start a Redis server or set 'redis' option to a valid URL.
Increase timeout option or ensure all nodes are reachable.