Mirror leaf node stream on the main server #7584
Replies: 2 comments
-
|
Some more digging I've done: What I'm trying to accomplish now is to see the leaf node's JS status with What exactly has to be done to make the JS server status from the leaf node available in the hub? |
Beta Was this translation helpful? Give feedback.
-
|
If you are trying to extend a NATS system, and hence a JS domain, yes you should connect the system accounts across the leafnode. If you want separate JS domains, do not. I have not looked in detail at what you are trying to accomplish, but mirroring streams across a leafnode is very common. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I didn't have any luck getting answers on Slack, so here goes:
We have a main cluster on our setup with a NATS server, a service that manages NATS entities like accounts and JetStream streams and a bunch of services doing pub/sub. These service share an account and get their credentials from the mentioned management service. We have multiple tenants where every tenant has their own JS stream for persistence. Now we also need to attach leaf nodes that run on our customers servers. Every leaf node gets their own account and exports all events with external.> subject. The account on the main server imports these and rewrites the subject so they can be correlated to the correct tenant. Our services consume some of these events which I already got working. The missing piece in our setup is persistence. Locally we have a JS stream for the external subject. My initial idea was to mirror the stream in our main system and then add this stream as a source to the marching tenant stream. However I can't get this to work, local events are never available on the mirror stream. The JS domain should be correctly configured on the leaf node as well as the mirror. The main NATS server logs the correct domain when a leaf node connects. What am I missing here?
The account JWT for my leaf node account (for testing I allowed nearly everything):
The user JWT the leaf node uses:
Beta Was this translation helpful? Give feedback.
All reactions