Rate Limiter

Limiter is a new feature introduced in EMQX 5.0, it is a mechanism to restrict the number of messages that a client or topic can publish or subscribe to in a specified time period. For more information on the Limiter and how it works, see Rate limit.

For the moment, you can restrict the message rates from the following perspectives:

TypeDashboard UIDescriptionRecovery Behavior
bytes_rateData Publish Rate per ClientIncoming message size in bytes per secondPause receiving client messages
messages_rateMessages Publish Rate per ClientIncoming messages per secondPause receiving client messages
max_conn_rateMaximum Connection Rate per ListenerConnections per secondPause receiving new connections

Limiter can work on the listener level, for example, to set a Limiter for the default TCP listener, you can work with the code below:

  1. listeners.tcp.default {
  2. bind = "0.0.0.0:1883"
  3. max_conn_rate = "1000/s"
  4. messages_rate = "1000/s"
  5. bytes_rate = "1000MB/s"
  6. }

TIP

EMQX has offered more configuration items to better serve customized needs, you can continue to read Configuration Manual.