I am using a microservices architecture with event sourcing and leveraging NATS as the communication layer.
When a new event is generated, I send it to the event bus via JetStream, allowing relevant services to consume it. The JetStream instance is configured with Interest Retention. Microservices use a separate mechanism for projections at startup, which I will not cover here.
I have two clusters in different locations, currently operating in an active-passive setup. I need to ensure that events produced in Location-1 are also delivered to Location-2.
I do not want to modify the existing JetStream configuration. However, I can introduce a separate NATS cluster, JetStream instance, or service to handle synchronization.
Desired Scenario:I have looked into solutions like Leafnode, accounts, and JetStream domains, but I’m unsure if these approaches would fully support this scenario or how I should implement it.
What would be the best approach to achieve this synchronization while ensuring reliability?