stan-js-replicator

module
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2021 License: GPL-3.0

README

NATS Streaming/Jetstream Replicator [SJR]

GitHub Workflow Status Codecov

Introduction

This project replicates messages from streaming channels to jetstream. but why? At Snapp when we started using the nats-streaming there was no jetstream for nats, so streaming was our only solution to have reliable delivery for important events, but now streaming is going to be deprecated as mentioned here and jetstream has new features which we will use.

Right now all of our projects use streaming and we want to have an smooth migration so with this project we can replicate events on the jetstream side then remove them from streaming side.

How it works?

It uses the configuration as below to first creates the stream on jetstream and then binds the given topics to it as subjects. then it starts subscribing on given topics from nats streaming and publishes them into jetstream. if you want to bind topics into different streams you need to run different instances of sjr.

---
monitoring:
  enabled: true
  address: ":8080"
nats:
  url: "nats://127.0.0.1:4222"
logger:
telemetry:
streaming:
  url: "nats://127.0.0.1:4222"
  group: "sjr"
  clientid: "snapp"
channel: "koochooloo"
topics:
  - k.1
  - k.2
stream:
  maxage: "1h"
  storagetype: 1
  replicas: 1

Directories

Path Synopsis
cmd
sjr
internal
cmd
cmq

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL