55A simple java program that can start 1 or more NATS Servers and then add chaos,
66by taking one of them down on a delay and bringing it back up after a downtime.
77
8- ** Current Release** : N/A
9-   ; ** Current Snapshot** : 0.0.2 -SNAPSHOT
8+ ** Current Release** : 0.0.2
9+   ; ** Current Snapshot** : 0.0.3 -SNAPSHOT
1010  ; ** Gradle and Maven** ` io.synadia:chaos-runner `
1111
1212[ Dependencies Help] ( https://github.com/synadia-io/orbit.java?tab=readme-ov-file#dependencies )
1313
14- ## Usage
14+ ## Uber Jar
1515
16- The easier way to use is to just get the chaos-runner source directory from this repo and build it yourself via the
17- ```
18- gradle uberJar
19- ```
20- task from inside the chaos-runner folder, and then run the program from a command line with arguments.
21- Alternatively you can run a program like the [ ChaosRunnerExample] ( src/examples/java/io/synadia/examples/ChaosRunnerExample.java )
16+ The project builds an Uber Jar that contains the compiled code for the Chaos Runner and the Nats Server Runner.
17+ You can get this jar in 2 ways.
18+
19+ 1 . Download the release: [ chaos-runner-0.0.2-uber.jar] ( https://repo1.maven.org/maven2/io/synadia/chaos-runner/0.0.2/chaos-runner-0.0.2-uber.jar )
20+
21+ 2 . Build from the source. Get the entire chaos-runner source from this Orbit repo,
22+ and from the chaos-runner project directory and run ` gradle uberJar `
23+ The Uber Jar ` chaos-runner-0.0.2-SNAPSHOT-uber.jar ` will appear in the ` build/libs/ ` directory
24+ (relative to the ` chaos-runner ` project directory.)
2225
2326## Command Line Arguments
2427
@@ -33,12 +36,14 @@ Alternatively you can run a program like the [ChaosRunnerExample](src/examples/j
3336| ` --dir <path> ` | The working dir. Used as the parent dir for JetStream storage directories. | _ temp_ |
3437| ` --nojs ` | Do not run the server with JetStream. JetStream is on by default. | JetStream |
3538| ` --random ` | Take the servers down randomly. Default is Round Robin. | Round Robin |
36- | ` --port ` | The starting port. | 4220 |
39+ | ` --port ` | The starting server port. | 4220 |
3740| ` --listen ` | The starting listen port for clusters. | 4230 |
3841
39- Regarding ports. Given any starting port, the system automatically figures the ports for the other nodes.
40- For example for 3 nodes, if the starting port is 4220, other ports are 4221 and 4222.
41- If the listen port is 4230, the other listen ports are 4231 and 4232
42+ #### Regarding ports
43+ Given any starting port, the system automatically figures the ports for the other nodes.
44+ For example for 3 nodes:
45+ * if the starting server port is 4220, the other ports are 4221 and 4222.
46+ * if the listen port is 4230, the other listen ports are 4231 and 4232
4247
4348![ Artifact] ( https://img.shields.io/badge/Artifact-io.synadia:chaos--runner-00BC8E?labelColor=grey&style=flat )
4449[ ![ License Apache 2] ( https://img.shields.io/badge/License-Apache2-blue.svg )] ( https://www.apache.org/licenses/LICENSE-2.0 )
@@ -48,15 +53,23 @@ If the listen port is 4230, the other listen ports are 4231 and 4232
4853
4954## Command Line Examples
5055
51- Assuming you have just run gradle from the command line inside the chaos-runner directory...
52-
5356```
54- java -cp build/libs/chaos-runner-0.0.2-uber.jar io.synadia.chaos.ChaosRunner --delay 4000 --initial 10000 --cname mycluster --prefix myserver
57+ java -cp <Path-To>/<Jar-Name> io.synadia.chaos.ChaosRunner --delay 4000 --initial 10000 --cname mycluster --prefix myserver
58+ java -cp <Path-To>/<Jar-Name> io.synadia.chaos.ChaosRunner --servers 1 --delay 4000 --initial 10000
5559```
5660
57- ```
58- java -cp build/libs/chaos-runner-0.0.2-uber.jar io.synadia.chaos.ChaosRunner --servers 1 --delay 4000 --initial 10000
59- ```
61+ #### Path-To and Jar-Name
62+ 1\. If you downloaded the Uber Jar release:
63+ * the ` <Path-To> ` will be wherever you stored the file.
64+ * The ` <Jar-Name> ` will be ` chaos-runner-0.0.2-uber.jar ` .
65+
66+ 2\. If you build it yourself:
67+ * the ` <Path-To> ` will be relative to the ` chaos-runner ` directory in ` build/libs `
68+ * the ` <Jar-Name> ` will be ` chaos-runner-0.0.2-SNAPSHOT-uber.jar ` .
69+
70+ ## Other ways to run...
71+
72+ Alternatively you can run a program like the [ ChaosRunnerExample] ( src/examples/java/io/synadia/examples/ChaosRunnerExample.java ) from an ide.
6073
6174---
6275Copyright (c) 2025 Synadia Communications Inc. All Rights Reserved.
0 commit comments