简体   繁体   中英

Can NATS JetStream partially replicate streams on different NATS Servers

我有带有 NATS Jet Stream 的服务器 A。我希望在服务器 B 和服务器 C(NATS 流)上复制的部分 NATS 流相互排斥。

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 )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM