A scriptable load generator for MQTT
Description:
Generally speaking, this script can work in either script mode or in deamon mode. The mode is determined by whether REST API is enabled or not.
Basic usage: emqttb <gloabal parameters> @<scenario1> <scenario parameters> [@<scenario2> <scenario parameters> ...]
Repeat the last run: emqttb --again
Worker: a process that corresponds to a single MQTT client
Behavior: a callback module that defines which function worker runs in a loop
Group: a group of workers with the same behavior
Scenario: a script that creates several worker groups and controls the number of clients in each group using autoscale (see below)
Stage: scenario can be split into stages, e.g. connect clients, run traffic, disconnect clients, etc. Behaviors can depend on the stage.
Autorate: a function that calculates the optimal rate value based on some static and dynamic parameters, e.g. available RAM or CPU load.
Autoscale: a function that scales the size of the group up or down.
Repeat the last execution., see: convenience/again
Name of the repeat file or `undefined`, see: convenience/conf_dump
Read configuration from a file, see: ???
Keep the process running after completing all the scenarios, see: convenience/keep_running
Default loiter time for the scenarios (sec), see: convenience/loiter
Default interval between events, see: interval
Global log level, see: logging/level
Enable sending metrics to pushgateway, see: metrics/pushgateway/enabled
Maximum number of clients used by default by all groups, see: n_clients
Enable REST API, see: restapi/enabled
REST API listening interface/port, see: restapi/listen_port
Autorate configuration
When the loadgen creates too much traffic, the system may get overloaded. In this case, the test usually has to be restarted all over again with different parameters. This can be very expensive in man-hours and computing resources.
In order to prevent that, emqttb can tune some parameters (such as message publishing interval) automatically using PI contoller
ID of the autorate configuration, see: autorate/{}/id
Controller gain, see: autorate/{}/k_p
Maximum value of the controlled parameter, see: autorate/{}/max
Minimum value of the controlled parameter, see: autorate/{}/min
Maximum rate of change of the controlled parameter, see: autorate/{}/speed
Controller reset time, see: autorate/{}/t_i
Configuration for client groups
Description:
It is possible to override client configuration for the group.
Pointer at autorate configuration, see: groups/{}/autoscale
Hostname of the target broker, see: groups/{}/broker/hosts
Port of the target broker, see: groups/{}/broker/port
Clientid pattern, see: groups/{}/client/clientid
Password for connecting to the broker, see: groups/{}/client/password
Username of the client, see: groups/{}/client/username
maximum inflight messages for QoS 1 and 2, see: groups/{}/connection/inflight
MQTT protocol version, see: groups/{}/connection/proto_ver
Transport protocol, see: groups/{}/connection/transport
ID of the group, see: groups/{}/id
Reduce memory useage at the cost of CPU wherever possible, see: groups/{}/lowmem
Local IP addresses, see: groups/{}/net/ifaddr
Client certificate for authentication, if required by the server, see: groups/{}/ssl/certfile
Enable SSL for the connections, see: groups/{}/ssl/enable
Client private key for authentication, if required by the server, see: groups/{}/ssl/keyfile
Run scenario make-docs
Path to the external documentation source file, see: scenarios/emqttb_scenario_make_docs/{}/external_doc
Keep running scenario stages for this period of time (sec), see: scenarios/emqttb_scenario_make_docs/{}/loiter
Run scenario persistent_session
Client connection interval (microsecond), see: scenarios/emqttb_scenario_persistent_session/{}/conninterval
ID of the client group, see: scenarios/emqttb_scenario_persistent_session/{}/group
Keep running scenario stages for this period of time (sec), see: scenarios/emqttb_scenario_persistent_session/{}/loiter
How many times to repeat publish/consume cycle, see: scenarios/emqttb_scenario_persistent_session/{}/n_cycles
Size of the published message in bytes, see: scenarios/emqttb_scenario_persistent_session/{}/pub/msg_size
Number of publishers, see: scenarios/emqttb_scenario_persistent_session/{}/pub/n
ID of the autorate config used to tune publish interval, see: scenarios/emqttb_scenario_persistent_session/{}/pub/pub_autorate
Period of time while publishing will last (ms), see: scenarios/emqttb_scenario_persistent_session/{}/pub/pub_time
Message publishing interval (microsecond), see: scenarios/emqttb_scenario_persistent_session/{}/pub/pubinterval
QoS of the published messages, see: scenarios/emqttb_scenario_persistent_session/{}/pub/qos
Try to keep publishing time at this value (ms), see: scenarios/emqttb_scenario_persistent_session/{}/pub/set_pub_latency
Suffix of the topic to publish to, see: scenarios/emqttb_scenario_persistent_session/{}/pub/topic_suffix
Session expiry interval, see: scenarios/emqttb_scenario_persistent_session/{}/sub/expiry
Number of subscribers, see: scenarios/emqttb_scenario_persistent_session/{}/sub/n
Subscription QoS, see: scenarios/emqttb_scenario_persistent_session/{}/sub/qos
Run scenario pub
This scenario starts -N
workers, which publish messages to the
specified topic at period --pubinterval
. The only mandatory parameter
is --topic
, which supports pattern substitutions.
Configuration of the publishers (such as broker hostname and port, tcp settings, etc.) is delegated to #groups.
emqttb @pub -t foo/%n -N 100 -i 10ms -s 1kb
In this example the loadgen connects to the default broker mqtt://localhost:1883, starts 100 publishers which send messages to topic with the suffix of the worker id every 10 milliseconds. Size of the messages is 1kb.
emqttb @pub -t foo/%n @g --ssl --transport ws -h 127.0.0.1
In this example settings of the default client group has been changed: TLS encryption is enabled, and WebSocket transport is used. Also the hostname of the broker is specified explicitly.
emqttb @pub -t foo/%n -q 1 -g pub @g -g pub --ssl --transport ws -h 127.0.0.1
The below example is similar to the previous one, except QoS of the
messages is set to 1, and a dedicated client configuration with id pub
is used for the publishers. It's useful for running multiple scenarios
(e.g. @pub
and @sub
) in parallel, when they must use different
settings. For example, it can be used for testing MQTT bridge.
By default, @pub
scenario keeps pubinterval
constant. However, in
some situations it should be tuned dynamically: suppose one wants to
measure what publishing rate the broker can sustain while keeping
publish latency under --publatency
.
This is also useful for preventing system overload. Generating too much load can bring the system down, and the test has to be started all over again with different parameters. Sometimes finding the correct rate takes many attempts, wasting human and machine time. Dynamic tuning of the publishing rate for keeping the latency constant can help in this situation.
By default the maximum speed of rate adjustment is set to 0, effectively
locking the pubinterval
at a constant value. To enable automatic
tuning, the autorate speed -V
must be set to a non-zero value, also it
makes sense to set the minimum (-m
) and maximum (-M
) values of the
pubinterval
:
emqttb @pub -t foo -i 1s -q 1 --publatency 50ms @a -V 10 -m 0 -M 10000
Once automatic adjustment of the publishing interval is enabled, -i
parameter sets the starting value of the publish interval, rather than
the constant value. So the above example reads like this:
Publish messages to topic foo
with QoS 1, starting at the publishing
interval of 1000 milliseconds, dynamically adjusting it so to keep the
publishing latency around 50 milliseconds. The publishing interval is
kept between 0 and 10 seconds, and the maximum rate of its change is 10
milliseconds per second.
For more information about the automatic parameter tuning see #autorate.
Client connection interval (microsecond), see: scenarios/emqttb_scenario_pub/{}/conninterval
ID of the client group, see: scenarios/emqttb_scenario_pub/{}/group
Keep running scenario stages for this period of time (sec), see: scenarios/emqttb_scenario_pub/{}/loiter
Add metadata to the messages, see: scenarios/emqttb_scenario_pub/{}/metadata
Size of the published message in bytes, see: scenarios/emqttb_scenario_pub/{}/msg_size
Number of clients, see: scenarios/emqttb_scenario_pub/{}/n_clients
ID of the autorate config used to tune publish interval, see: scenarios/emqttb_scenario_pub/{}/pub_autorate
Message publishing interval (microsecond), see: scenarios/emqttb_scenario_pub/{}/pubinterval
QoS of the published messages, see: scenarios/emqttb_scenario_pub/{}/qos
Try to keep publishing time at this value (ms), see: scenarios/emqttb_scenario_pub/{}/set_pub_latency
Topic where the clients shall publish messages, see: scenarios/emqttb_scenario_pub/{}/topic
Run scenario pubsub_fwd
First all subscribers connect and subscribe to the brokers, then the publishers start to connect and publish. The default is to use full forwarding of messages between the nodes: that is, each publisher client publishes to a topic subscribed by a single client, and both clients reside on distinct nodes.
Full forwarding of messages is the default and can be set by #full_forwarding.
./emqttb --restapi @pubsub_fwd --publatency 10ms --num-clients 400 -i 70ms @g -h 172.25.0.2:1883,172.25.0.3:1883,172.25.0.4:1883
In this example the loadgen connects to a list of brokers in a round-robin in the declared order. First all the subscribers, then the publishers, with the difference that publishers will shift the given host list by one position to ensure each publisher and subscriber pair will reside on different hosts, thus forcing all messages to be forwarded.
Client connection interval (microsecond), see: scenarios/emqttb_scenario_pubsub_forward/{}/conninterval
Whether all messages should be forwarded between nodes, see: scenarios/emqttb_scenario_pubsub_forward/{}/full_forwarding
ID of the client group, see: scenarios/emqttb_scenario_pubsub_forward/{}/group
Keep running scenario stages for this period of time (sec), see: scenarios/emqttb_scenario_pubsub_forward/{}/loiter
Total number of connections (pub + sub), see: scenarios/emqttb_scenario_pubsub_forward/{}/num_clients
Size of the published message in bytes, see: scenarios/emqttb_scenario_pubsub_forward/{}/pub/msg_size
ID of the autorate config used to tune publish interval, see: scenarios/emqttb_scenario_pubsub_forward/{}/pub/pub_autorate
Message publishing interval (microsecond), see: scenarios/emqttb_scenario_pubsub_forward/{}/pub/pubinterval
QoS of the published messages, see: scenarios/emqttb_scenario_pubsub_forward/{}/pub/qos
Try to keep publishing time at this value (ms), see: scenarios/emqttb_scenario_pubsub_forward/{}/pub/set_pub_latency
Subscription QoS, see: scenarios/emqttb_scenario_pubsub_forward/{}/sub/qos
Run scenario sub
Client connection interval, see: scenarios/emqttb_scenario_sub/{}/conninterval
Set 'Session-Expiry' for persistent sessions (seconds), see: scenarios/emqttb_scenario_sub/{}/expiry
ID of the client group, see: scenarios/emqttb_scenario_sub/{}/group
Keep running scenario stages for this period of time (sec), see: scenarios/emqttb_scenario_sub/{}/loiter
Number of clients, see: scenarios/emqttb_scenario_sub/{}/n_clients
QoS of the subscription, see: scenarios/emqttb_scenario_sub/{}/qos
Topic that the clients shall subscribe, see: scenarios/emqttb_scenario_sub/{}/topic
The following OS environment variables are used to set configuration values. Values of type string() are taken from OS environment variables verbatim, other types are parsed as Erlang terms.
Priority: 0
Name of the repeat file or `undefined`, see: convenience/conf_dump
Keep the process running after completing all the scenarios, see: convenience/keep_running
Default loiter time for the scenarios (sec), see: convenience/loiter
Log level for the default handler, see: logging/default_handler_level
Global log level, see: logging/level
Enable sending metrics to pushgateway, see: metrics/pushgateway/enabled
Push interval (ms), see: metrics/pushgateway/interval
URL of pushgateway server, see: metrics/pushgateway/url
Enable REST API, see: restapi/enabled
REST API listening interface/port, see: restapi/listen_port
Any value can be set using this configuration file. It should have the following form:
#{ key1 => value
, key2 =>
#{ key3 => value
}
}.
Priority: -110
This section lists all maps.
Autorate configuration
Key elements:
When the loadgen creates too much traffic, the system may get overloaded. In this case, the test usually has to be restarted all over again with different parameters. This can be very expensive in man-hours and computing resources.
In order to prevent that, emqttb can tune some parameters (such as message publishing interval) automatically using PI contoller
Configuration for client groups
Key elements:
Description:
It is possible to override client configuration for the group.
Run scenario make-docs
Key elements:
Run scenario persistent_session
Key elements:
Run scenario pub
Key elements:
This scenario starts -N
workers, which publish messages to the
specified topic at period --pubinterval
. The only mandatory parameter
is --topic
, which supports pattern substitutions.
Configuration of the publishers (such as broker hostname and port, tcp settings, etc.) is delegated to #groups.
emqttb @pub -t foo/%n -N 100 -i 10ms -s 1kb
In this example the loadgen connects to the default broker mqtt://localhost:1883, starts 100 publishers which send messages to topic with the suffix of the worker id every 10 milliseconds. Size of the messages is 1kb.
emqttb @pub -t foo/%n @g --ssl --transport ws -h 127.0.0.1
In this example settings of the default client group has been changed: TLS encryption is enabled, and WebSocket transport is used. Also the hostname of the broker is specified explicitly.
emqttb @pub -t foo/%n -q 1 -g pub @g -g pub --ssl --transport ws -h 127.0.0.1
The below example is similar to the previous one, except QoS of the
messages is set to 1, and a dedicated client configuration with id pub
is used for the publishers. It's useful for running multiple scenarios
(e.g. @pub
and @sub
) in parallel, when they must use different
settings. For example, it can be used for testing MQTT bridge.
By default, @pub
scenario keeps pubinterval
constant. However, in
some situations it should be tuned dynamically: suppose one wants to
measure what publishing rate the broker can sustain while keeping
publish latency under --publatency
.
This is also useful for preventing system overload. Generating too much load can bring the system down, and the test has to be started all over again with different parameters. Sometimes finding the correct rate takes many attempts, wasting human and machine time. Dynamic tuning of the publishing rate for keeping the latency constant can help in this situation.
By default the maximum speed of rate adjustment is set to 0, effectively
locking the pubinterval
at a constant value. To enable automatic
tuning, the autorate speed -V
must be set to a non-zero value, also it
makes sense to set the minimum (-m
) and maximum (-M
) values of the
pubinterval
:
emqttb @pub -t foo -i 1s -q 1 --publatency 50ms @a -V 10 -m 0 -M 10000
Once automatic adjustment of the publishing interval is enabled, -i
parameter sets the starting value of the publish interval, rather than
the constant value. So the above example reads like this:
Publish messages to topic foo
with QoS 1, starting at the publishing
interval of 1000 milliseconds, dynamically adjusting it so to keep the
publishing latency around 50 milliseconds. The publishing interval is
kept between 0 and 10 seconds, and the maximum rate of its change is 10
milliseconds per second.
For more information about the automatic parameter tuning see #autorate.
Run scenario pubsub_fwd
Key elements:
First all subscribers connect and subscribe to the brokers, then the publishers start to connect and publish. The default is to use full forwarding of messages between the nodes: that is, each publisher client publishes to a topic subscribed by a single client, and both clients reside on distinct nodes.
Full forwarding of messages is the default and can be set by #full_forwarding.
./emqttb --restapi @pubsub_fwd --publatency 10ms --num-clients 400 -i 70ms @g -h 172.25.0.2:1883,172.25.0.3:1883,172.25.0.4:1883
In this example the loadgen connects to a list of brokers in a round-robin in the declared order. First all the subscribers, then the publishers, with the difference that publishers will shift the given host list by one position to ensure each publisher and subscriber pair will reside on different hosts, thus forcing all messages to be forwarded.
Run scenario sub
Key elements:
This section lists all configurable values.
ID of the autorate configuration
Type:
atom()
Default value:
default
Autorate configuration can be referred by id.
Controller gain
Type:
number()
Default value:
0.05
Maximum value of the controlled parameter
Type:
integer()
Default value:
100000000
Minimum value of the controlled parameter
Type:
integer()
Default value:
0
Maximum rate of change of the controlled parameter
Type:
integer()
Default value:
0
Controller reset time
Type:
number()
Default value:
1
Repeat the last execution.
Type:
boolean()
Default value:
false
Description:
Note: it tries best to restore the previous environment, so it only makes sense to use this option alone, as it overrides other options.
Name of the repeat file or `undefined`
Type:
string() | undefined when
string() :: [char()].
Default value:
".emqttb.repeat"
Description:
If set to a string value, emqttb will dump its configuration to a "repeat" file that can be used to quickly repeat the last run.
Note: only the successful runs of the script are saved.
Keep the process running after completing all the scenarios
Type:
boolean()
Default value:
See restapi/enabled
Description:
By default, when started without REST API, emqttb script terminates after completing all the scenarios, which is useful for scripting. However, when running with REST API, such behavior is undesirable. So when REST is enabled, the default behavior is different: the process keeps running waiting for commands.
This flag can be used to explicitly override this behavior.
Default loiter time for the scenarios (sec)
Type:
timeout() when
non_neg_integer() :: 0..inf,
timeout() :: non_neg_integer() | infinity.
Default value:
infinity
Pointer at autorate configuration
Type:
atom()
Default value:
default
Hostname of the target broker
Type:
emqttb:hosts() when
emqttb:hosts() :: [string() | {string(), emqttb:net_port()}],
emqttb:net_port() :: 1..65535,
string() :: [char()].
Default value:
["localhost"]
Port of the target broker
Type:
emqttb:net_port() | default when
emqttb:net_port() :: 1..65535.
Default value:
default
Clientid pattern
Type:
binary()
Default value:
<<"%h-%g-%n">>
A pattern used to generate ClientID. The following substitutions are supported:
-
%n
is replaced with the worker ID (integer) -
%g
is replaced with the group ID -
%h
is replaced with the hostname
Password for connecting to the broker
Type:
undefined | string() when
string() :: [char()].
Default value:
undefined
Username of the client
Type:
undefined | string() when
string() :: [char()].
Default value:
undefined
maximum inflight messages for QoS 1 and 2
Type:
non_neg_integer() | infinity when
non_neg_integer() :: 0..inf.
Default value:
10
MQTT protocol version
Type:
emqttb:proto_ver() when
emqttb:proto_ver() :: v5 | v4 | v3.
Default value:
v5
Transport protocol
Type:
emqttb:transport() when
emqttb:transport() :: quic | ws | sock.
Default value:
sock
ID of the group
Type:
atom()
Default value:
default
Reduce memory useage at the cost of CPU wherever possible
Type:
boolean()
Default value:
false
Local IP addresses
Type:
emqttb:ifaddr_list() when
emqttb:ifaddr_list() :: [ip_address(),...],
ip4_address() :: {0..255, 0..255, 0..255, 0..255},
ip6_address() :: {0..65535, 0..65535, 0..65535, 0..65535, 0..65535, 0..65535, 0..65535, 0..65535},
ip_address() :: ip6_address() | ip4_address().
Default value:
[{0,0,0,0}]
Client certificate for authentication, if required by the server
Type:
string() when
string() :: [char()].
Default value:
[]
Enable SSL for the connections
Type:
boolean()
Default value:
false
Client private key for authentication, if required by the server
Type:
string() when
string() :: [char()].
Default value:
[]
Default interval between events
Type:
emqttb:duration_us() when
emqttb:duration_us() :: integer().
Default value:
100000
It is possible to specify time unit as ms, us or s.
Log level for the default handler
Type:
lee_logger:level() when
lee_logger:level() :: alert | critical | error | warning | notice | info | debug.
Default value:
See logging/level
Global log level
Type:
lee_logger:level() when
lee_logger:level() :: alert | critical | error | warning | notice | info | debug.
Default value:
notice
Enable sending metrics to pushgateway
Type:
boolean()
Default value:
false
Push interval (ms)
Type:
emqttb:duration_ms() when
emqttb:duration_ms() :: integer().
Default value:
1000
URL of pushgateway server
Type:
string() when
string() :: [char()].
Default value:
"http://localhost:9091"
Maximum number of clients used by default by all groups
Type:
0..16777116
Default value:
1000
Enable REST API
Type:
boolean()
Default value:
false
Description:
By default, REST API is disabled and emqttb runs in script mode. To enable it, run the script with --restapi flag.
/healthcheck: Healthcheck endpoint. Just returns 200 all the time.
/metrics: Prometheus metrics endpoiont
/scenario/:scenario/stage: Returns the currently running stage of a scenario.
/conf/reload: Reload configuration in the runtime.
REST API listening interface/port
Type:
listen_port_ip4() when
ip4_address() :: {0..255, 0..255, 0..255, 0..255},
listen_port_ip4() :: {ip4_address(), 1..65535}.
Default value:
0.0.0.0:8017
Path to the external documentation source file
Type:
string() when
string() :: [char()].
Keep running scenario stages for this period of time (sec)
Type:
timeout() when
non_neg_integer() :: 0..inf,
timeout() :: non_neg_integer() | infinity.
Default value:
Client connection interval (microsecond)
Type:
emqttb:duration_us() when
emqttb:duration_us() :: integer().
Default value:
0
ID of the client group
Type:
atom()
Default value:
default
Keep running scenario stages for this period of time (sec)
Type:
timeout() when
non_neg_integer() :: 0..inf,
timeout() :: non_neg_integer() | infinity.
Default value:
How many times to repeat publish/consume cycle
Type:
non_neg_integer() | inifinity when
non_neg_integer() :: 0..inf.
Default value:
10
Size of the published message in bytes
Type:
non_neg_integer() when
non_neg_integer() :: 0..inf.
Default value:
256
Number of publishers
Type:
0..16777116
Default value:
10
ID of the autorate config used to tune publish interval
Type:
atom()
Default value:
default
Period of time while publishing will last (ms)
Type:
emqttb:duration_ms() when
emqttb:duration_ms() :: integer().
Default value:
1000
Message publishing interval (microsecond)
Type:
emqttb:duration_us() when
emqttb:duration_us() :: integer().
Default value:
See interval
QoS of the published messages
Type:
emqttb:qos() when
emqttb:qos() :: 0..2.
Default value:
2
Warning: changing QoS to any value other then 2 is likely to cause consume stage to hang, since it has to consume the exact number of messages as previously produced.
Try to keep publishing time at this value (ms)
Type:
emqttb:duration_ms() when
emqttb:duration_ms() :: integer().
Default value:
100
Suffix of the topic to publish to
Type:
binary()
Default value:
<<"%h/%n">>
Session expiry interval
Type:
non_neg_integer() when
non_neg_integer() :: 0..inf.
Default value:
4294967295
Number of subscribers
Type:
0..16777116
Default value:
10
Subscription QoS
Type:
emqttb:qos() when
emqttb:qos() :: 0..2.
Default value:
2
Warning: changing QoS to any value other then 2 is likely to cause consume stage to hang, since it has to consume the exact number of messages as previously produced.
Client connection interval (microsecond)
Type:
emqttb:duration_us() when
emqttb:duration_us() :: integer().
Default value:
See interval
ID of the client group
Type:
atom()
Default value:
default
Keep running scenario stages for this period of time (sec)
Type:
timeout() when
non_neg_integer() :: 0..inf,
timeout() :: non_neg_integer() | infinity.
Default value:
Add metadata to the messages
Type:
boolean()
Default value:
false
Size of the published message in bytes
Type:
emqttb:byte_size() when
emqttb:byte_size() :: non_neg_integer(),
non_neg_integer() :: 0..inf.
Default value:
256
Number of clients
Type:
0..16777116
Default value:
See n_clients
ID of the autorate config used to tune publish interval
Type:
atom()
Default value:
default
Message publishing interval (microsecond)
Type:
emqttb:duration_us() when
emqttb:duration_us() :: integer().
Default value:
See interval
QoS of the published messages
Type:
emqttb:qos() when
emqttb:qos() :: 0..2.
Default value:
0
Try to keep publishing time at this value (ms)
Type:
emqttb:duration_ms() when
emqttb:duration_ms() :: integer().
Default value:
100
Topic where the clients shall publish messages
Type:
binary()
Topic is a mandatory parameter. It supports the following substitutions:
-
%n
is replaced with the worker ID (integer) -
%g
is replaced with the group ID -
%h
is replaced with the hostname
Client connection interval (microsecond)
Type:
emqttb:duration_us() when
emqttb:duration_us() :: integer().
Default value:
0
Whether all messages should be forwarded between nodes
Type:
boolean()
Default value:
true
ID of the client group
Type:
atom()
Default value:
default
Keep running scenario stages for this period of time (sec)
Type:
timeout() when
non_neg_integer() :: 0..inf,
timeout() :: non_neg_integer() | infinity.
Default value:
Total number of connections (pub + sub)
Type:
0..16777116
Default value:
100
Size of the published message in bytes
Type:
non_neg_integer() when
non_neg_integer() :: 0..inf.
Default value:
256
ID of the autorate config used to tune publish interval
Type:
atom()
Default value:
default
Message publishing interval (microsecond)
Type:
emqttb:duration_us() when
emqttb:duration_us() :: integer().
Default value:
See interval
QoS of the published messages
Type:
emqttb:qos() when
emqttb:qos() :: 0..2.
Default value:
1
Try to keep publishing time at this value (ms)
Type:
emqttb:duration_ms() when
emqttb:duration_ms() :: integer().
Default value:
100
Subscription QoS
Type:
emqttb:qos() when
emqttb:qos() :: 0..2.
Default value:
1
Client connection interval
Type:
emqttb:duration_us() when
emqttb:duration_us() :: integer().
Default value:
See interval
Set 'Session-Expiry' for persistent sessions (seconds)
Type:
non_neg_integer() | undefined when
non_neg_integer() :: 0..inf.
Default value:
undefined
ID of the client group
Type:
atom()
Default value:
default
Keep running scenario stages for this period of time (sec)
Type:
timeout() when
non_neg_integer() :: 0..inf,
timeout() :: non_neg_integer() | infinity.
Default value:
Number of clients
Type:
0..16777116
Default value:
See n_clients
QoS of the subscription
Type:
emqttb:qos() when
emqttb:qos() :: 0..2.
Default value:
0
Topic that the clients shall subscribe
Type:
binary()