log.error("The QoS level should be 0 or 1 or 2. The connection will be closed. remotingChannel={}, MqttMessage={}",remotingChannel.toString(),message.toString());
remotingChannel.close();
returnnull;
...
...
@@ -128,7 +128,7 @@ public class MqttPublishMessageHandler implements MessageHandler {
}finally{
ReferenceCountUtil.release(message);
}
break;
caseAT_LEAST_ONCE:
// Store msg and invoke callback to publish msg to subscribers
// 1. Check if the root topic has been created
...
...
@@ -183,11 +183,11 @@ public class MqttPublishMessageHandler implements MessageHandler {
log.error("Store Qos=1 Message error: {}",ex);
}
});
break;
caseEXACTLY_ONCE:
thrownewMqttRuntimeException("Qos = 2 messages are not supported yet.");