emqx/apps/emqx_slow_subs
Thales Macedo Garitezi 19f3b030f9 chore: preparing to run common tests / eunit with mix 2024-07-02 09:45:45 -03:00
..
etc feat: generate a minimized emqx.conf 2022-05-31 19:20:27 +08:00
include chore: update copyright-year 2024-02-23 08:21:06 +01:00
src chore: update copyright-year 2024-02-23 08:21:06 +01:00
test chore: update copyright-year 2024-02-23 08:21:06 +01:00
README.md chore: update apps/emqx_slow_subs/README.md 2023-04-19 09:51:19 +08:00
mix.exs chore: preparing to run common tests / eunit with mix 2024-07-02 09:45:45 -03:00
rebar.config refactor: move emqx_json to emqx_utils_json 2023-04-14 13:31:27 +02:00

README.md

EMQX Slow Subscriptions

This application can calculate the latency (time spent) of the message to be processed and transmitted since it arrives at EMQX.

If the latency exceeds a specified threshold, this application will add the subscriber and topic information to a slow subscriptions list or update the existing record.

More introduction: Slow Subscriptions

Usage

You can add the below section into emqx.conf to enable this application

slow_subs {
  enable = true
  threshold = "500ms"
  expire_interval = "300s"
  top_k_num = 10
  stats_type = whole
}

Configurations

threshold: Latency threshold for statistics, only messages with latency exceeding this value will be collected.

Minimum value: 100ms
Default value: 500ms

expire_interval: Eviction time of the record, will start the counting since the creation of the record, and the records that are not triggered again within this specified period will be removed from the rank list.

Default: 300s

top_k_num: Maximum number of records in the slow subscription statistics record table.

Maximum value: 1,000
Default value: 10

stats_type: Calculation methods of the latency, which are

  • whole: From the time the message arrives at EMQX until the message transmission completes
  • internal: From when the message arrives at EMQX until when EMQX starts delivering the message
  • response: From the time EMQX starts delivering the message until the message transmission completes

Default value: whole

Contributing

Please see our contributing.md.