Link Search Menu Expand Document Edit GitHub

Run


The run command of the HiveMQ Swarm command line offers a set of commands to start and stop runs.

mqtt swarm run

Commands

CommandExplanation
startSee start
stopSee stop

Options

OptionLong VersionExplanationDefault
-url The URL of the HiveMQ Swarm Rest endpoint.http://localhost:8888

Logging Options

OptionLong VersionExplanationDefault
-l Log to ~./mqtt-cli/logs (Configurable through ~/.mqtt-cli/config.properties).false

Help Options

OptionLong VersionExplanation
-h--helpDisplay help message for command.
-V--versionDisplay version information of the cli.

Start Run


Start a scenario, either blocking or detached.

mqtt swarm run

Options

OptionLong VersionExplanationDefault
-url The URL of the HiveMQ Swarm Rest endpoint.http://localhost:8888
-f--fileThe scenario to execute.required
-d--dettachExecute the scenario in detached (non-blocking) mode.The current run

Logging Options

OptionLong VersionExplanationDefault
-l Log to ~./mqtt-cli/logs (Configurable through ~/.mqtt-cli/config.properties).false

Help Options

OptionLong VersionExplanation
-h--helpDisplay help message for command.
-V--versionDisplay version information of the cli.

Further Examples

Blocking Mode

Upload and execute a scenario from a file. The scenario is deleted on the HiveMQ Swarm Commander afterward. This command returns after the scenario is finished. Stopping the process will also stop the scenario.

$ mqtt swarm run start -f /path/to/scenario

Successfully uploaded scenario. Scenario-id: 2
Run id: 1
Run status: STARTING
Run status: RUNNING
Scenario Stage: Stage with id 's1' (1/3).
Run status: RUNNING
Scenario Stage: Stage with id 's2' (2/3).
Run status: RUNNING
Scenario Stage: Stage with id 's3' (3/3).
Run status: FINISHED
Scenario Stage: Stage with id 's3' (3/3).

Detached Mode

Upload and execute a scenario from a file. This command returns immediately after the scenario was started.

$ mqtt swarm run start -f /path/to/scenario -d

Successfully uploaded scenario. Scenario-id: 2
Run id: 1
Run status: STARTING

Stop Run

Stop a running scenario using the run id.

mqtt swarm run stop

Options

OptionLong VersionExplanationDefault
-url The URL of the HiveMQ Swarm Rest endpoint.http://localhost:8888
-r--run-idThe id of the run to stop.The current run

Logging Options

OptionLong VersionExplanationDefault
-l Log to ~./mqtt-cli/logs (Configurable through ~/.mqtt-cli/config.properties).false

Help Options

OptionLong VersionExplanation
-h--helpDisplay help message for command.
-V--versionDisplay version information of the cli.