Registry / messaging / redis-messaging-manager

redis-messaging-manager

JSON →
library1.6.2jsnpmunverified

Pubsub messaging library using Redis and RxJS 5 with TypeScript support. Current stable version is 1.6.2. It provides a simple PubsubManager class for publishing and consuming messages through a Redis broker. Key differentiators: consume method returns RxJS 5 Observable for event streaming; auto-reconnect on broker failure; server event stream subscription. Release cadence appears low (last release likely 2018-2019). Bindings to RxJS 5 (not RxJS 6+) and ioredis.

npm install redis-messaging-manager
INSTALL
IMPORT
SIG · REDIS-MESSAGING-MA
R
redis-messaging-manager
messagingjavascriptv1.6.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PubsubManager
import { PubsubManager } from 'redis-messaging-manager'
const PubsubManager = require('redis-messaging-manager').PubsubManager
Default export is not available; use named import. CommonJS require with destructuring is required.
PubsubManagerOptions
import { PubsubManager } from 'redis-messaging-manager'
import PubsubManager from 'redis-messaging-manager'
Type is exported as a named interface, but not directly importable? Actually only class is exported. No separate type import.
default export
import { PubsubManager } from 'redis-messaging-manager'
import PubsubManager from 'redis-messaging-manager'
No default export; must use named import.

Shows instantiation of PubsubManager, consuming messages as RxJS Observable, publishing, and subscribing to server events.

import { PubsubManager } from 'redis-messaging-manager'; const messenger = new PubsubManager({ host: 'localhost' }); // Subscribe to messages on 'myChannel' messenger.consume('myChannel').subscribe({ next: (msg) => console.log('Received:', msg), error: (err) => console.error(err) }); // Publish a message messenger.publish('myChannel', { hello: 'world' }); // Get server events messenger.getServerEventStream().subscribe(event => console.log('Server event:', event));
Debug
Known issues
deprecatedUses RxJS 5 – not compatible with RxJS 6+ (pipeable operators).
fix
If using RxJS 6+, consider alternative library or wrap observables with rxjs-compat.
affects: >=1.0.0
gotchaconsume() returns Observable from RxJS 5 – subscription memory leak if not unsubscribed.
fix
Always unsubscribe from Observable when no longer needed, e.g., using takeUntil or subscription.unsubscribe().
affects: >=1.0.0
gotchaNo built-in error handling for Redis connection failures beyond reconnect logic; errors may be silent.
fix
Attach error handler to server event stream via getServerEventStream().subscribe({ error: ... }).
affects: >=1.0.0
breakingBreaking change: v1.0.0 switched from redis to ioredis library, changing configuration options.
fix
Use ioredis-compatible options (host, port, etc.) instead of node_redis options.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: PubsubManager is not a constructor
Default import used instead of named import.
fix
Use `import { PubsubManager } from 'redis-messaging-manager'`.
Error: Cannot find module 'redis'
The library uses ioredis, not redis. Old node_redis dependency conflict.
fix
Ensure ioredis is installed and no incompatible redis version exists.
Subscription is not a function (RxJS 5 vs 6)
RxJS 6 changed Observable creation; this library uses RxJS 5.
fix
Install rxjs@5 or use rxjs-compat for backward compatibility.
Upgrade
Version history
1.6.2latest on npm
Audit
Dependencies
ioredisrequiredRedis client library for messaging broker
rxjsrequiredReactive extensions for Observable-based consume
Agent activity
21 hits · last 30 days
node
20
OpenAI (training)
1
Resources
redis-messaging-manager — npm install redis-messaging-manager · libregistry