Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
levb committed Jan 8, 2024
1 parent a534c74 commit b6f16a5
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
MQTT Test is a CLI command used to test and benchmark the MQTT support in [NATS Server](https://github.com/nats-io/nats-server)

Outputs JSON results that can be reported in a `go test --bench` wrapper.

#### Usage

##### Subcommands and common flags

```sh
mqtt-test [pub|pubsub] [flags...]
mqtt-test [pub|pubsub|subret] [flags...]
```

Available Commands:
- [pub](#pub) - Publish N messages
- [pubsub](#pubsub) - Subscribe and receive N messages

- [pubsub](#pubsub) - Subscribe and receive N published messages
- [subret](#subret) - Subscribe N times, and receive NTopics retained messages
Common Flags:
```
-h, --help help for mqtt-test
Expand Down Expand Up @@ -53,4 +54,17 @@ Publishes N messages, and waits for all of them to be received by subscribers. M
--qos int MQTT QOS
--size int Approximate size of each message (pub adds a timestamp)
--topic string MQTT topic
```
```

##### subret

Publishes retained messages into NTopics, then subscribes to a wildcard with all
topics N times. Measures time to SUBACK and to all retained messages received.
Used with `--num-subscribers` can run several concurrent subscriber connections.

```
--num-subscribers int Number of subscribers to run concurrently (default 1)
--num-topics int Use this many topics with retained messages
--qos int MQTT QOS
--size int Approximate size of each message (pub adds a timestamp)
```

0 comments on commit b6f16a5

Please sign in to comment.