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

@idenstra/messaging-runtime

v1.0.0

Published

TypeScript AWS SNS/SQS worker runtime, publishers, queue ops, DLQ redrive, and OpenTelemetry helpers for Node.js services

Readme

messaging-runtime

messaging-runtime is a TypeScript AWS SNS/SQS worker runtime, publisher, queue-ops, DLQ redrive, and OpenTelemetry helper library for Node.js services.

It stays deliberately narrow so AWS SQS worker, SNS over SQS consumer, SNS/SQS publisher, and native DLQ redrive behavior stay visible, testable, and cheap to operate:

  • SQS worker execution, shutdown, timeouts, heartbeats, and route lifecycle
  • SNS/SQS publish, resolve, discovery, and queue-ops helpers
  • native SQS DLQ redrive support
  • OpenTelemetry-first metrics and tracing helpers

It does not try to flatten Kafka, RabbitMQ, Redis streams, or other transport families into one cross-transport abstraction. The point is to keep Amazon SNS/SQS behavior visible, testable, and cheap to operate.

When to use it

Use this library when your service needs to:

  • run an AWS SQS worker with bounded concurrency and explicit ack behavior
  • process SNS notifications delivered through SQS without hiding the SNS envelope or raw-delivery choices
  • publish to SQS queues or SNS topics from shared application code
  • inspect queues, list attached DLQ sources, and run native SQS redrive tasks
  • expose OpenTelemetry metrics and traces from a plain Node.js or NestJS worker service without baking an observability vendor into core code

Start here

  1. Read docs/QUICK_START.md for the shortest worker + publisher setup.
  2. Use docs/GETTING_STARTED.md as the cookbook for common worker, publisher, queue-ops, and observability recipes.
  3. Follow docs/ADOPTION.md when embedding the library into a real service.

If you only want the docs map, go straight to docs/README.md.

Quick start

The common setup is one AWS SDK SQSClient, wrapped once by AwsSqsAdapter, then used by a SqsWorkerServiceHost.

import { SQSClient } from '@aws-sdk/client-sqs';
import {
  AwsSqsAdapter,
  SqsQueueUrlResolver,
  SqsWorkerServiceHost,
  parseSqsWorkerServiceManifest,
  runSqsWorkerServiceUntilSignal,
  sqsJsonRoute,
} from '@idenstra/messaging-runtime';

type JobMessage = { jobId: string };

const sqsAdapter = new AwsSqsAdapter(new SQSClient({ region: 'us-east-1' }));
const queueResolver = new SqsQueueUrlResolver(sqsAdapter, {
  preload: { jobs: 'https://sqs.us-east-1.amazonaws.com/123456789012/jobs' },
  allowNetworkLookup: false,
});

const host = new SqsWorkerServiceHost({
  client: sqsAdapter,
  queueResolver,
  manifest: parseSqsWorkerServiceManifest({
    routes: { jobs: { queue: 'jobs' } },
  }),
  routes: [
    sqsJsonRoute<JobMessage>({
      name: 'jobs',
      handle: async ({ payload }) => {
        console.log(payload.jobId);
      },
    }),
  ],
});

await runSqsWorkerServiceUntilSignal(host);

For the deeper first-run path, including a minimal publisher example, use docs/QUICK_START.md.

Supported imports

Supported imports are intentionally narrow:

  • @idenstra/messaging-runtime
  • @idenstra/messaging-runtime/core
  • @idenstra/messaging-runtime/nest
  • @idenstra/messaging-runtime/observability

Do not deep-import from dist/ or internal source files.

Documentation map

Start

Build and operate

Extend and verify

Release and reference

Proof lanes

The default repo gate stays deterministic:

make audit
HARNESS_STRICT=1 make verify-fast

Optional proof lanes stay separate:

  • make verify-localstack for LocalStack-backed SNS/SQS end-to-end proof
  • make verify-observability for repo-owned OTEL/SigNoz metrics and traces proof
  • make verify-aws-smoke for real AWS feature-family smoke before publication or when emulator proof is not enough

See docs/TESTING.md for the suite boundaries and escalation rules.

Current status

  • package: @idenstra/messaging-runtime
  • runtime baseline: Node.js >=24
  • compatibility posture: stable 1.x contract documented in docs/COMPATIBILITY.md
  • public installation: npmjs

Deliberate non-goals

This package does not own:

  • transport-neutral abstractions that hide SNS/SQS behavior
  • business handlers or application payload contracts
  • environment, secrets, or config-file loading
  • queue/topic provisioning or IAM management APIs
  • generic manual reprocessing tooling
  • live AWS requirements in the default harness

Consumer applications still own configuration, dependency wiring, rollout, idempotency, and domain-safe recovery policy.

Contributing

If you want to contribute to the repository, start with CONTRIBUTING.md.

If you are using AI assistance or need the maintainer workflow rules directly, also read AGENTS.md.

Maintainer workflow and release mechanics are documented in WORKFLOW.md, docs/HARNESS.md, and docs/RELEASES.md.