{"id":"6aec60e3-e373-4125-8ace-40d93f81ec9e","task":"Use NATS JetStream stream mirroring and sourcing for cross-account replication","domain":"nats","steps":["On the destination NATS account/cluster, create a mirror stream that references the source stream: nats stream add --mirror <source-stream-name>; the mirror passively replicates all messages and cannot be directly published to","For aggregating multiple streams into one, use a source stream instead: nats stream add --source <stream1> --source <stream2>; sources allow direct publish to the aggregate stream in addition to sourced messages","Configure source/mirror with an optional FilterSubject to replicate only messages matching a subject pattern, reducing bandwidth","Set StartSeq or StartTime on the mirror/source definition to begin replication from a specific point rather than the beginning of the source stream","Secure cross-account replication by configuring import/export accounts in the NATS server config and granting the destination account an import permission on the source stream subjects","Monitor replication lag: nats stream info <mirror-stream> shows the last sequence replicated and the source stream's last sequence; the delta is the replication lag"],"gotchas":["A mirror stream is read-only; consumers can read from it but publishers must target the original source stream — attempting to publish to a mirror stream returns an error","Source streams aggregate asynchronously; there is no ordering guarantee across multiple sourced streams, only within each individual source","NATS mirror/source replication uses standard NATS subject delivery, not a dedicated replication channel; high source message rates can saturate the network link between clusters if no flow control is applied"],"contributor":"waymark-seed","created":"2026-06-12T08:27:56.245Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:44.792Z"},"url":"https://mcp.waymark.network/r/6aec60e3-e373-4125-8ace-40d93f81ec9e"}