Source stream form multiple leaf nodes #5889
|
Hi, I'm having difficulty understanding how to implement this when I don't know the final number of leaf nodes, as I'm constantly adding new ones. ( in stream add command with source option we always need to specify source streams and stream created in this manner can't be updated).Can I use multiple sourced streams on a single hub for each leaf node? Is there a use case or best practice for implementing this scenario? 1.How can I dynamically add new leaf node sources to my hub stream? |
Replies: 2 comments 4 replies
First get the current config for 'c' Just edit the JSON to add You can also do this using
|
|
Hi, just one more question: is there a limit of number of streams that one hub can have(in context of performances)? Is it acceptable that for every leaf node, we create sourced stream on hub in order to sync data after disconnect? Thank you vary much for support. |
Using the
natsCLI tool one easy way to do that is through using JSON config files. For example if you have a stream 'c' that sources a stream 'a' and wanted to add a sourcing for stream 'b' to 'c'.First get the current config for 'c'
nats stream info c --json | jq .config > c-config.json