Skip to content

Commit 8270539

Browse files
authored
Merge pull request #23 from dist-sys/refactor_v0.8.1
Change Gradle wrapper version.
2 parents 7c0afa0 + e1f6c7c commit 8270539

File tree

5 files changed

+154
-153
lines changed

5 files changed

+154
-153
lines changed

README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# MQTTLoader
2-
MQTTLoader is a load testing tool (client tool) for MQTT.
3-
It supports both MQTT v5.0 and v3.1.1, as well as TLS authentication is available.
2+
MQTTLoader is a load testing tool (client tool) for MQTT v5.0 and v3.1.1.
43

54
- [Usage (English)](https://github.com/dist-sys/mqttloader/blob/master/doc/usage_en.md)
65
- [Usage (日本語)](https://github.com/dist-sys/mqttloader/blob/master/doc/usage_jp.md)
@@ -31,4 +30,4 @@ MQTTLoader is licensed under the Apache License, Version2.0.
3130
## Contact
3231
https://www.banno-lab.net/en/contact/
3332

34-
We welcome enquiries for research collaborations.
33+
We welcome inquiries for research collaborations.

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
}
55

66
wrapper {
7-
gradleVersion = '6.6.1'
7+
gradleVersion = '7.2'
88
}
99

1010
mainClassName = 'mqttloader.Loader'

doc/usage_en.md

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MQTTLoader usage (v0.8.1)
1+
# MQTTLoader usage (v0.8.2)
22
MQTTLoader is a load testing tool (client tool) for MQTT.
33
It supports both MQTT v5.0 and v3.1.1.
44
From v0.8.0, it supports TLS authentication.
@@ -13,7 +13,7 @@ Download the archive file (zip or tar) from: https://github.com/dist-sys/mqttloa
1313
Below is an example of downloading by using curl command.
1414

1515
```
16-
$ curl -OL https://github.com/dist-sys/mqttloader/releases/download/v0.8.1/mqttloader-0.8.1.zip
16+
$ curl -OL https://github.com/dist-sys/mqttloader/releases/download/v0.8.2/mqttloader-0.8.1.zip
1717
```
1818

1919
By extracting it, you can get the following files.
@@ -53,6 +53,7 @@ By default *mqttloader.conf* is used, but you can specify your own configuration
5353

5454
`$ ./mqttloader -c "/home/testuser/myconfig.conf"`
5555

56+
Hereafter, we assume that the default configuration file *mqttloader.conf* is used.
5657
If you just want to quickly confirm how MQTTLoader works, using a public broker is an easy way.
5758
For example, a public MQTT broker provided by HiveMQ is used by the following configuration.
5859
(Please do not make a heavy load on public brokers.)
@@ -112,7 +113,7 @@ You can run MQTTLoader on multiple machines.
112113
Running both publishers and subscribers on a single machine may cause mutual influence, e.g., the subscribers' receiving load lowers the publishers' throughput.
113114
By running publishers and subscribers separately on different machines, you can avoid such mutual influence.
114115

115-
For example, on a host A, you can run MQTTLoader with the following configuration:
116+
For example, on a host A, you can run MQTTLoader with the following configuration in *mqttloader.conf*:
116117

117118
```
118119
broker = <IP>
@@ -123,7 +124,7 @@ subscriber_timeout = 20
123124
ntp = <NTP-SERVER>
124125
```
125126

126-
Subsequently, you can run another MQTTLoader on a host B with the following configuration:
127+
Subsequently, you can run another MQTTLoader on a host B with the following configuration in *mqttloader.conf*:
127128

128129
```
129130
broker = <IP>
@@ -135,7 +136,7 @@ ntp = <NTP-SERVER>
135136
```
136137

137138
By these, from the publisher on host B to the subscriber on the host A via the broker, MQTT messages are delivered.
138-
When running on multiple machines, the following parameters in the configuration file should be considered.
139+
When running on multiple machines, the following parameters in *mqttloader.conf* should be considered.
139140

140141
- Specify the same NTP server on host A and host B with the parameter `ntp`.
141142
- Specify enough long timeout period with the parameter `subscriber_timeout`.
@@ -146,7 +147,7 @@ The former is to improve the accuracy of latency calculation, whereas the latter
146147
MQTTLoader supports TLS authentication.
147148

148149
To connect with a broker by TLS, truststore file in JKS (Java Key Store) format that contains CA certificate is needed.
149-
By specifying the JKS file with the parameter `tls_truststore` in the configuration file, TLS authentication is enabled.
150+
By specifying the JKS file with the parameter `tls_truststore` in *mqttloader.conf*, TLS authentication is enabled.
150151

151152
Below is an example procedure when using Mosquitto's public broker.
152153

@@ -155,7 +156,7 @@ Below is an example procedure when using Mosquitto's public broker.
155156
`$ keytool -importcert -alias rootCA -trustcacerts -keystore ./truststore.jks -storetype jks -storepass testpass -file ./mosquitto.org.crt`<br>
156157
In this example, the file name is set to `truststore.jks` and the password is set to `testpass`.
157158
3. Place the truststore file in an appropriate directory. In this example, we assume to place it in `/home/testuser`.
158-
4. Specify the following parameters in MQTTLoader's configuration file.<br>
159+
4. Specify the following parameters in *mqttloader.conf*.<br>
159160
`broker = test.mosquitto.org`<br>
160161
`broker_port = 8883`<br>
161162
`tls_truststore = /home/testuser/truststore.jks`<br>
@@ -165,7 +166,7 @@ In this example, the file name is set to `truststore.jks` and the password is se
165166
#### TLS client authentication
166167
To enable client authentication, you need to prepare keystore file in JKS format in addition to the above mentioned procedure.
167168
The keystore file must contain client key / client certificate / CA certificate.
168-
By specifying the keystore file with the parameter `tls_keystore` in the configuration file, TLS client authentication is enabled.
169+
By specifying the keystore file with the parameter `tls_keystore` in *mqttloader.conf*, TLS client authentication is enabled.
169170

170171
Below is an example procedure when using Mosquitto's public broker.
171172

@@ -180,7 +181,7 @@ https://test.mosquitto.org/ssl/
180181
`$ openssl pkcs12 -export -out client.p12 -passout pass:testpass -passin pass:testpass -inkey client.key -in client.crt -certfile mosquitto.org.crt`<br>
181182
`$ keytool -importkeystore -srckeystore client.p12 -srcstorepass testpass -srcstoretype PKCS12 -destkeystore keystore.jks -deststorepass testpass -deststoretype JKS`<br>
182183
6. Place the keystore file in an appropriate directory. In this example, we assume to place it in `/home/testuser` together with the truststore file.
183-
7. Specify the following parameters in MQTTLoader's configuration file.<br>
184+
7. Specify the following parameters in *mqttloader.conf*.<br>
184185
`broker = test.mosquitto.org`<br>
185186
`broker_port = 8884`<br>
186187
`tls_truststore = /home/testuser/truststore.jks`<br>

doc/usage_jp.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MQTTLoader 利用方法 (v0.8.1)
1+
# MQTTLoader 利用方法 (v0.8.2)
22
MQTTLoaderは、MQTT v5.0とv3.1.1に対応した負荷テストツール(クライアントツール)です。
33
v0.8.0から、ブローカとのTLS接続にも対応しました。
44

@@ -14,7 +14,7 @@ https://github.com/dist-sys/mqttloader/releases
1414
以下は、Curlコマンドを使ってダウンロードする場合の例です。
1515

1616
```
17-
$ curl -OL https://github.com/dist-sys/mqttloader/releases/download/v0.8.1/mqttloader-0.8.1.zip
17+
$ curl -OL https://github.com/dist-sys/mqttloader/releases/download/v0.8.2/mqttloader-0.8.1.zip
1818
```
1919

2020
ダウンロードしたファイルを解凍すると、以下のディレクトリ構造が得られます。
@@ -53,8 +53,9 @@ num_messages = 10
5353

5454
`$ ./mqttloader -c "/home/testuser/myconfig.conf"`
5555

56+
以降の説明は、デフォルトの設定ファイル *mqttloader.conf* を利用するものとして記述しています。
5657
MQTTLoaderの動作を確認するだけなら、パブリックブローカを使うのが手軽です。
57-
例えば、設定ファイルにて以下のようにブローカを指定すると、HiveMQが提供しているパブリックブローカに接続することができます。
58+
例えば、 *mqttloader.conf* にて以下のようにブローカを指定すると、HiveMQが提供しているパブリックブローカに接続することができます。
5859
(高い負荷をかけるような使い方にならないよう、注意してください。)
5960

6061
```
@@ -135,7 +136,7 @@ ntp = <NTP-SERVER>
135136
```
136137

137138
これにより、ホストB上のpublisherから、ホストA上のsubscriberへ、ブローカを経由してメッセージが流れます。
138-
複数台で実行する場合、設定ファイルの以下のパラメータに留意してください
139+
複数台で実行する場合、 *mqttloader.conf* の以下のパラメータに留意してください
139140

140141
- `ntp` にて同じNTPサーバを指定すること
141142
- `subscriber_timeout` にてsubscriberの受信タイムアウト時間を十分に長くとること
@@ -146,7 +147,7 @@ ntp = <NTP-SERVER>
146147
MQTTLoaderは、ブローカとのTLS接続が可能です。
147148

148149
ブローカとTLS接続するためには、まず、CA証明書をインポートしたトラストストアファイルを、JKS(Java Key Store)形式で用意します。
149-
そして、用意したJKSファイルを、設定ファイルの `tls_truststore` で指定します。
150+
そして、用意したJKSファイルを、 *mqttloader.conf* `tls_truststore` で指定します。
150151

151152
以下、Mosquittoのパブリックブローカを例に、手順を述べます。
152153

@@ -155,7 +156,7 @@ MQTTLoaderは、ブローカとのTLS接続が可能です。
155156
`$ keytool -importcert -alias rootCA -trustcacerts -keystore ./truststore.jks -storetype jks -storepass testpass -file ./mosquitto.org.crt`<br>
156157
ここでは、ファイル名を `truststore.jks` 、パスワードを `testpass` として生成している。
157158
3. トラストストアファイルを、適切なディレクトリに配置。ここでは、 `/home/testuser` に置くと仮定する。
158-
4. MQTTLoaderの設定ファイルに、以下を指定<br>
159+
4. *mqttloader.conf*、以下を指定<br>
159160
`broker = test.mosquitto.org`<br>
160161
`broker_port = 8883`<br>
161162
`tls_truststore = /home/testuser/truststore.jks`<br>
@@ -165,7 +166,7 @@ MQTTLoaderは、ブローカとのTLS接続が可能です。
165166
#### TLSクライアント認証
166167
クライアント認証もおこなう場合、上記に加え、キーストアファイル(JKS形式)の用意が必要です。
167168
キーストアファイルには、クライアント証明書・クライアントの鍵・CA証明書を格納します。
168-
用意したキーストアファイルを、設定ファイルの `tls_keystore` で指定することで、TLSクライアント認証が有効となります。
169+
用意したキーストアファイルを、 *mqttloader.conf* `tls_keystore` で指定することで、TLSクライアント認証が有効となります。
169170

170171
以下、Mosquittoのパブリックブローカを例に、手順を述べます。
171172

0 commit comments

Comments
 (0)