From e496bfb69d3cf0be530714c3244e5d402150bd0d Mon Sep 17 00:00:00 2001 From: Parham Alvani Date: Sun, 19 Sep 2021 11:54:50 +0430 Subject: [PATCH] feat: update readme --- README.md | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e6c4187..c4868ef 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# NATS Streaming/Jetstream Replicator +# NATS Streaming/Jetstream Replicator [SJR] ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/snapp-incubator/stan-js-replicator/ci?label=ci&logo=github&style=flat-square) @@ -13,3 +13,32 @@ 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. + +```yaml +--- +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 +```