Can NATS JetStream partially replicate streams on different NATS Servers?

1.1k views Asked by At

I have Server A with NATS Jet Stream. I want some part of NATS Streams replicated on Server B and Server C (NATS Streams) mutually exclusive.

1

There are 1 answers

0
JNM On

As far as the Stream's built-in replication goes you can not: all the messages are replicated in all the nats-servers (according to the number of replicas). But you can use tags to select which cluster (or which servers in a cluster) are used. You can also mirror streams and source streams from other streams (and subjects).

I should add that you can also effectively split a stream in multiple streams (like partitions) by using the partition function of subject name mapping since nats-server version 2.8. (https://docs.nats.io/nats-concepts/subject_mapping#deterministic-subject-token-partitioning)