Skip to content

Commit

Permalink
Update example
Browse files Browse the repository at this point in the history
Signed-off-by: Byron Ruth <[email protected]>
  • Loading branch information
bruth committed Dec 21, 2022
1 parent d98d434 commit 147f48b
Showing 1 changed file with 31 additions and 8 deletions.
39 changes: 31 additions & 8 deletions examples/issues/3724/cli/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,32 @@ cat <<- EOF > origin.json
}
EOF

cat <<- EOF > mirror.json
cat <<- EOF > hub-mirror.json
{
"name": "events-m",
"retention": "limits",
"max_consumers": -1,
"max_msgs_per_subject": -1,
"max_msgs": -1,
"max_bytes": -1,
"max_age": 0,
"max_msg_size": -1,
"storage": "file",
"discard": "old",
"num_replicas": 1,
"mirror": {
"name": "events"
},
"sealed": false,
"deny_delete": false,
"deny_purge": false,
"allow_rollup_hdrs": false,
"allow_direct": false,
"mirror_direct": false
}
EOF

cat <<- EOF > leaf-mirror.json
{
"name": "events",
"retention": "limits",
Expand All @@ -264,9 +289,9 @@ cat <<- EOF > mirror.json
"max_msg_size": -1,
"storage": "file",
"discard": "old",
"num_replicas": 2,
"num_replicas": 1,
"mirror": {
"name": "events",
"name": "events-m",
"external": {
"api": "\$JS.hub.API"
}
Expand All @@ -281,10 +306,8 @@ cat <<- EOF > mirror.json
EOF

nats --context hub-app stream add --config origin.json
nats --context leaf-app stream add --config mirror.json

nats --context hub-app stream report
nats --context leaf-app stream report
nats --context hub-app stream add --config hub-mirror.json
nats --context leaf-app stream add --config leaf-mirror.json

echo 'Starting bench...'
nats bench \
Expand All @@ -299,7 +322,7 @@ nats bench \
--multisubject \
events

sleep 1
sleep 2

# Report the streams
nats --context hub-app stream report
Expand Down

1 comment on commit 147f48b

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for nats-by-example ready!

✅ Preview
https://nats-by-example-pyl9888lb-connecteverything.vercel.app

Built with commit 147f48b.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.