npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rotorsoft/act-notify

v0.2.2

Published

Hybrid notify-broker decorator for Act stores — ride Redis (or any broker) for cross-process wakeups while the durable log stays on your store

Downloads

365

Readme

@rotorsoft/act-notify

Ride a broker for cross-process wakeups — the durable log stays exactly where it is.

Why this package

The practical ceiling for Act's built-in cross-process wakeup is the Postgres LISTEN/NOTIFY subscriber-connection budget: every worker holds a dedicated listener connection, and connection budgets are precious. Because Store.notify is a hint, not a contract — correctness always comes from claim()/drain over the durable store — the wakeup channel is swappable without touching a single durability, lease, or ordering guarantee. This package is that swap: withBroker(store, broker) delegates every durable Store method to the wrapped adapter and overrides only the notification channel. One Redis fans out to thousands of workers; the log never moves.

Installation

pnpm add @rotorsoft/act-notify
# peer: @rotorsoft/act — and bring your own broker client (e.g. redis)

Quick start

import { store } from "@rotorsoft/act";
import { PostgresStore } from "@rotorsoft/act-pg";
import { RedisBroker, withBroker } from "@rotorsoft/act-notify";
import { createClient } from "redis";

const publisher = createClient();
const subscriber = publisher.duplicate(); // redis pub/sub needs its own connection
await publisher.connect();
await subscriber.connect();

store(
  withBroker(
    new PostgresStore({ notify: false }), // broker carries the wakeups now
    new RedisBroker({ publisher, subscriber })
  )
);
// ...then act()...build() as usual — the orchestrator wires notify automatically

Sink-injection, zero dependencies: you pass connected clients (node-redis v4+ shapes); the package never pins your client version. Commits publish a wakeup hint, notify subscribes, and the self-filtering contract (your own commits never wake you) is handled by a per-instance origin id.

Brokers

  • RedisBroker — pub/sub fan-out; every subscribed worker sees every wakeup. Implemented and the recommended production choice.
  • LoopbackBroker — in-process fan-out; the reference implementation, used by the TCK conformance run and handy for tests or multi-orchestrator single-process setups.
  • KafkaBroker — a scaffold that refuses loudly. Kafka consumer groups deliver each message to one consumer per group, while wakeups need fan-out to every worker; until the per-process groupId/offset/rebalance semantics are settled against a real deployment, the adapter throws with guidance instead of fanning out incorrectly.

Any { publish, subscribe } implementation of the exported Broker type works — NATS, MQTT, or your own bus are a dozen lines away.

What this does not do

It does not shard the durable log. Writes, replay, and global ordering stay bound to the wrapped store — if the log itself is the wall, see the partitioning and split-stores recipes. A broker outage degrades cross-process latency to the poll cycle and nothing else: publish failures are swallowed and logged, and a broker that drops, duplicates, or reorders every message changes nothing about what drain processes (there is a test that does exactly that).

Conformance

The decorator passes the full Store TCK — including the lease-semantics cases — wrapping a real PostgresStore. If you decorate a different adapter, run runStoreTck from @rotorsoft/act-tck over your wrapped factory to prove the same.

Related packages

Documentation

License

MIT