Я добавил перехватчик mqtt в свой брокер artemis, чтобы перехватить клиентское соединение 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;
}
Мой клиент apache paho подключается к брокеру через этот порт "ws: //0.0.0.0: 61614".
Моя проблема в том, что перехватываются только сообщения, опубликованные в темах.
Почему это не перехватывает сообщение CONNECT?