Skip to content

Rate Limiter Configuration

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. 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 RateIncoming message size in bytes per second per clientPause receiving client messages
messages_rateMessages Publish RateIncoming messages per second per clientPause receiving client messages
max_conn_rateMaximum Connection RateConnections per second per listenerPause receiving new connections

For example, to set a limiter for the default TCP listener, you can use the configuration below:

bash
listeners.tcp.default {
  bind = "0.0.0.0:1883"
  max_conn_rate = "1000/s"
  messages_rate = "1000/s"
  bytes_rate = "1MB/s"
}

TIP

EMQX has offered more configuration items to serve customized needs better. For details, see Configuration Manual.