# Messaging patterns for Node.js

Source: https://imqueue.org/blog/topics/patterns/

Messaging patterns for Node.js services: request/reply, competing consumers, work queues, delayed and recurring work, and Redis pub/sub versus streams.

6 articles tagged `patterns`, newest first.

- [One notification, every replica: the LISTEN/NOTIFY duplicate problem](https://imqueue.org/blog/postgres-notify-duplicate-listeners/) — 2026-07-31, Serhiy Morenko: LISTEN/NOTIFY is a broadcast, not a queue. Scale a Node app to three replicas and the same notification gets handled three times — no error, no warning, three charges on the card. Here's why, and what an inter-process lock actually does about it. — [markdown](https://imqueue.org/blog/postgres-notify-duplicate-listeners/index.md)
- [Graceful shutdown and zero-drop deploys](https://imqueue.org/blog/graceful-shutdown-zero-drop-deploys/) — 2026-07-28, Andrii Glushko: Every deploy sends a kill signal to a process that is probably in the middle of something. Nothing 500s, no dashboard turns red, and the work is gone anyway. Here's what actually happens to an in-flight message on SIGTERM, and the drain that keeps it. — [markdown](https://imqueue.org/blog/graceful-shutdown-zero-drop-deploys/index.md)
- [Auto-scaling Redis broker: with and without broadcast](https://imqueue.org/blog/horizontally-scalable-redis-broker/) — 2026-07-24, Serhiy Morenko: One Redis behind your message bus is a ceiling and a single point of failure. The promoter and unicaster modules turn a fleet of plain Redis instances into a horizontally auto-scaling broker — here are the recipes for networks that deliver broadcast and for clouds like GCP that don't. — [markdown](https://imqueue.org/blog/horizontally-scalable-redis-broker/index.md)
- [One isolated imq CLI home per @imqueue project](https://imqueue.org/blog/isolated-imq-cli-environments/) — 2026-07-23, Andrii Glushko: Every imq invocation shares one ~/.imq — one config, one pid registry, one set of logs. Here's how to give each project its own isolated CLI environment with IMQ_CLI_HOME, plus recipes for direnv, shell wrappers, per-client tokens and disposable sandboxes. — [markdown](https://imqueue.org/blog/isolated-imq-cli-environments/index.md)
- [RPC over Redis in Node.js: patterns and pitfalls](https://imqueue.org/blog/rpc-over-redis-nodejs/) — 2026-07-23, Serhiy Morenko: How request/reply RPC over Redis actually works in Node.js — correlation, timeouts and at-least-once delivery, which of those @imqueue handles for you, and what it deliberately leaves to you: retrying a failed RPC call, coalescing duplicate concurrent calls with @lock, and the circuit breaker it does not ship. — [markdown](https://imqueue.org/blog/rpc-over-redis-nodejs/index.md)
- [Redis as a message bus: patterns beyond pub/sub](https://imqueue.org/blog/redis-message-bus-patterns/) — 2026-06-22, Mykhailo Stadnyk: Most people know Redis pub/sub and stop there. Redis has richer primitives — lists, blocking pops, and streams — that make it a capable message bus. Here's a tour, and where each fits. — [markdown](https://imqueue.org/blog/redis-message-bus-patterns/index.md)

## Other topics

- [Message queues](https://imqueue.org/blog/topics/queue/) — 13 articles
- [Architecture](https://imqueue.org/blog/topics/architecture/) — 10 articles
- [Comparisons](https://imqueue.org/blog/topics/comparison/) — 9 articles
- [RPC](https://imqueue.org/blog/topics/rpc/) — 9 articles
- [Developer experience](https://imqueue.org/blog/topics/dx/) — 6 articles
- [Transports](https://imqueue.org/blog/topics/transport/) — 5 articles
- [Type safety](https://imqueue.org/blog/topics/types/) — 5 articles
- [Message delivery](https://imqueue.org/blog/topics/delivery/) — 4 articles
- [Resilience](https://imqueue.org/blog/topics/resilience/) — 4 articles
- [Typed clients](https://imqueue.org/blog/topics/clients/) — 3 articles
- [Jobs & scheduling](https://imqueue.org/blog/topics/jobs/) — 3 articles

All articles: [https://imqueue.org/blog/](https://imqueue.org/blog/) — [markdown](https://imqueue.org/blog/index.md)

