The project is in a healthy, maintained state
Production-ready publishers/consumers for NATS JetStream with app-scoped subjects, overlap guards, DLQ routing, retries/backoff, and optional inbox/outbox patterns. Includes health checks, auto-reconnection, graceful shutdown, topology setup helpers, and Rails generators.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 7.1.5.2, < 8.0
>= 7.1.5.2, < 8.0
>= 2.4.0, < 3.0
>= 3.16, < 4.0
 Project Readme

JetStream Bridge Logo

CI Status Coverage Status Gem Version Downloads License

Production-ready NATS JetStream bridge for Ruby/Rails with outbox, inbox, DLQ, and overlap-safe stream provisioning.

Highlights

  • Transactional outbox and idempotent inbox (optional) for exactly-once pipelines.
  • Durable pull (default) or push consumers with retries, backoff, and DLQ routing.
  • Auto stream provisioning with overlap protection; consumers auto-created on subscription.
  • Rails-native: generators, migrations, health check, and eager-loading safety.
  • Least-privilege friendly: run with auto_provision=false (stream must exist; consumers are auto-created).
  • Mock NATS for fast, no-infra testing.

Quick Start

# Gemfile
gem "jetstream_bridge", "~> 7.1"
bundle install
bin/rails g jetstream_bridge:install
bin/rails db:migrate

The install generator creates the initializer, migrations, and optional health check scaffold. For full configuration options and non-Rails boot flows, see docs/GETTING_STARTED.md.

Publish:

JetstreamBridge.publish(event_type: "user.created", resource_type: "user", payload: { id: 1 })

Consume:

consumer = JetstreamBridge::Consumer.new do |event|
  User.upsert({ id: event.payload["id"] })
end
consumer.run!

Documentation

License

MIT