'Can NATS JetStream partially replicate streams on different NATS Servers

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.



Solution 1:[1]

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)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1