2017-08-11 103 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添加该功能,因此,它应该在未来的版本中存在。

相关问题