//invoke copy to generate a new ByteBuf or increase refCnt by 1 by invoking retain() method, because release method is invoked in Message2MessageEncodeDecode.channelRead
log.error("The QoS level should be 0 or 1 or 2. The connection will be closed. remotingChannel={}, MqttMessage={}",remotingChannel.toString(),message.toString());
log.error("The payload of a SUBSCRIBE packet MUST contain at least one Topic Filter / QoS pair. This will be treated as protocol violation and the connection will be closed. remotingChannel={}, MqttMessage={}",remotingChannel.toString(),message.toString());
remotingChannel.close();
returnnull;
}
if(isQosLegal(payload.topicSubscriptions())){
log.error("The QoS level of Topic Filter / QoS pairs should be 0 or 1 or 2. The connection will be closed. remotingChannel={}, MqttMessage={}",remotingChannel.toString(),message.toString());
...
...
@@ -97,12 +99,13 @@ public class MqttSubscribeMessageHandler implements MessageHandler {
log.error("Malformed value of reserved bits(bits 3,2,1,0) of fixed header. Expected=0010, received={}{}{}{}",fixedHeader.isDup()?1:0,Integer.toBinaryString(fixedHeader.qosLevel().value()),fixedHeader.isRetain()?1:0);
log.error("The payload of a UNSUBSCRIBE packet MUST contain at least one Topic Filter. This will be treated as protocol violation and the connection will be closed. remotingChannel={}, MqttMessage={}",remotingChannel.toString(),message.toString());
log.error("Can't find associated client, the connection will be closed. remotingChannel={}, MqttMessage={}",remotingChannel.toString(),message.toString());