0

I added a mqtt interceptor into my artemis broker in order to intercept mqtt client connection:

  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; 
    } 

My client apache paho connect to the broker via this port "ws://0.0.0.0:61614".
My problem is that only message published to topics are intercepted.
Why this doesn't intercept CONNECT message ?

4

1 回答 1

0

当前版本的 ActiveMQ Artemis,2.2.0,在我写这个响应的时候,只支持拦截 MQTT 发布控制数据包。我打开了一个拉取请求,添加了该功能,因此,它应该出现在未来的版本中。

于 2017-08-17T20:25:32.580 回答