2017-08-11 118 views
0

我加了MQTT攔截到我的ARTEMIS經紀人爲了攔截MQTT客戶機連接:阿蒂米斯經紀人攔截MQTT客戶機連接

public class SimpleMQTTInterceptor implements MQTTInterceptor 
    { 

    @Override 
    public boolean intercept(final MqttMessage mqttMessage, RemotingConnection connection) throws ActiveMQException 
    { 

      System.out.println("MQTT Interceptor gets called "); 

      if (mqttMessage instanceof MqttConnectMessage) 
      { 
        System.out.println("MQTT connection intercepted "); 
      } 
      return true; 
    } 

我的客戶阿帕奇泛美衛生組織連接,通過這個接口「WS經紀人://0.0 .0.0:61614" 。
我的問題是,只有發佈到主題的消息被攔截。
爲什麼這不攔截CONNECT消息?

回答

0

當我編寫此響應時,ActiveMQ Artemis 2.2.0的當前版本僅支持攔截MQTT發佈控制數據包。 I opened a pull request添加該功能,因此,它應該在未來的版本中存在。