Improve logging. Remove duplicated code from QosPublishHandlers.
This commit is contained in:
@@ -29,7 +29,10 @@ class InternalRepublisher {
|
||||
//fire as retained the message
|
||||
Integer packetID = storedMsg.getQos() == AbstractMessage.QOSType.MOST_ONE ? null : targetSession.nextPacketId();
|
||||
if (packetID != null) {
|
||||
LOG.trace("Adding to inflight <{}>", packetID);
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Adding message to inflight zone. MqttClientId = {}, packetId = {}, messageId = {}, topic = {}.",
|
||||
targetSession.clientID, packetID, storedMsg.getMessageID(), storedMsg.getTopic());
|
||||
}
|
||||
targetSession.inFlightAckWaiting(storedMsg.getGuid(), packetID);
|
||||
}
|
||||
PublishMessage publishMsg = retainedPublish(storedMsg);
|
||||
@@ -47,7 +50,10 @@ class InternalRepublisher {
|
||||
|
||||
for (IMessagesStore.StoredMessage pubEvt : storedPublishes) {
|
||||
//put in flight zone
|
||||
LOG.trace("Adding to inflight <{}>", pubEvt.getMessageID());
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Adding message ot inflight zone. MqttClientId = {}, guid = {}, messageId = {}, topic = {}.",
|
||||
clientSession.clientID, pubEvt.getGuid(), pubEvt.getMessageID(), pubEvt.getTopic());
|
||||
}
|
||||
clientSession.inFlightAckWaiting(pubEvt.getGuid(), pubEvt.getMessageID());
|
||||
PublishMessage publishMsg = notRetainedPublish(pubEvt);
|
||||
//set the PacketIdentifier only for QoS > 0
|
||||
|
||||
Reference in New Issue
Block a user