diff --git a/README.md b/README.md index 4ecb212..52afb43 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,21 @@ -# JetStream Mirroring using Benthos +# JetStream Mirroring Mirroring our NATS (JetStream) cluster from different -regions to each other by using __Benthos__. -In this repository I mirrored one stream inside a JetStream service to another stream inside a different -JetStream cluster. I used Benthos to do this message duplicating. +regions to each other, using __Benthos__. +In this project, I provided an example in which I mirrored one stream inside a JetStream cluster to another stream +inside a different JetStream cluster. +In order to do this, I used __Benthos__ as a third party service between the two clusters. ## Benthos configs +Benthos is a high performance and resilient stream processor, able to connect +various sources and sinks in a range of brokering patterns and perform hydration, enrichments, +transformations and filters on payloads. +Read more about [Benthos](https://github.com/benthosdev/benthos). + ### Input -Input is our first nats js service that is the main jet-stream cluster. -We config our benthos input based of the configs in our -project. +Input is our first NATS (JetStream) service that is the main cluster. ```yaml input: @@ -19,16 +23,16 @@ input: nats_jetstream: urls: [ "nats://0.0.0.0:4222" ] queue: "" - subject: "snapp*" + subject: "snapp*" # subject durable: "" - stream: "snapp" + stream: "snapp" # stream bind: false deliver: all ``` ### Output -Output is our back-up nats js service, which will be mirrored +Output is the other NATS (JetStream) service, which will be mirrored by the main service. ```yaml @@ -39,11 +43,11 @@ output: subject: "snapp*" ``` -## Setup +## Example Setup Use the following command to start Benthos, two NATS clusters, bootstrap service, two consumers, and one publisher to see the mirroring between clusters: ```shell docker-compose up -``` \ No newline at end of file +```