Kaynağa Gözat

fix: filter system message

yr 2 yıl önce
ebeveyn
işleme
97b60ec212
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  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
 %%%===================================================================
 
-match_topic(#message{topic = <<"$SYS/">>}, _) ->
-    false;
 match_topic(_, <<$#, _/binary>>) ->
     false;
 match_topic(_, <<$+, _/binary>>) ->
     false;
+match_topic(#message{topic = <<"$SYS/", _/binary>>}, _) ->
+    false;
 match_topic(#message{topic = Topic}, Filter) ->
     emqx_topic:match(Topic, Filter);
 match_topic(_, _) ->