Browse Source

fix: filter system message

yr 2 years ago
parent
commit
97b60ec212
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/emqx_plugin_kafka_hook.erl

+ 2 - 2
src/emqx_plugin_kafka_hook.erl

@@ -217,12 +217,12 @@ on_message_acked(ClientInfo, Message, Opts = #{filter := Filter}) ->
 %%% External functions
 %%% External functions
 %%%===================================================================
 %%%===================================================================
 
 
-match_topic(#message{topic = <<"$SYS/">>}, _) ->
-    false;
 match_topic(_, <<$#, _/binary>>) ->
 match_topic(_, <<$#, _/binary>>) ->
     false;
     false;
 match_topic(_, <<$+, _/binary>>) ->
 match_topic(_, <<$+, _/binary>>) ->
     false;
     false;
+match_topic(#message{topic = <<"$SYS/", _/binary>>}, _) ->
+    false;
 match_topic(#message{topic = Topic}, Filter) ->
 match_topic(#message{topic = Topic}, Filter) ->
     emqx_topic:match(Topic, Filter);
     emqx_topic:match(Topic, Filter);
 match_topic(_, _) ->
 match_topic(_, _) ->