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 ?