diff --git a/apps/emqx/etc/emqx.conf b/apps/emqx/etc/emqx.conf index 486900a60..0b877cf0b 100644 --- a/apps/emqx/etc/emqx.conf +++ b/apps/emqx/etc/emqx.conf @@ -577,8 +577,9 @@ mqtt { ## @doc mqtt.max_topic_levels ## ValueType: Integer ## Range: [1, 65535] - ## Default: 65535 - max_topic_levels = 65535 + ## Default: 128 + ## Depth so big may lead to subscribing performance issues + max_topic_levels = 128 ## Maximum QoS allowed. ## diff --git a/apps/emqx/test/emqx_channel_SUITE.erl b/apps/emqx/test/emqx_channel_SUITE.erl index 911341440..284cea784 100644 --- a/apps/emqx/test/emqx_channel_SUITE.erl +++ b/apps/emqx/test/emqx_channel_SUITE.erl @@ -59,7 +59,7 @@ mqtt_conf() -> max_inflight => 32,max_mqueue_len => 1000, max_packet_size => 1048576,max_qos_allowed => 2, max_subscriptions => infinity,max_topic_alias => 65535, - max_topic_levels => 65535,mqueue_default_priority => lowest, + max_topic_levels => 128,mqueue_default_priority => lowest, mqueue_priorities => disabled,mqueue_store_qos0 => true, peer_cert_as_clientid => disabled, peer_cert_as_username => disabled, @@ -200,7 +200,7 @@ t_chan_caps(_) -> #{max_clientid_len := 65535, max_qos_allowed := 2, max_topic_alias := 65535, - max_topic_levels := 65535, + max_topic_levels := 128, retain_available := true, shared_subscription := true, subscription_identifiers := true,