Reinserted route to qo0 branch in publish2Subscribers for internal publish
This commit is contained in:
@@ -622,6 +622,10 @@ public class ProtocolProcessor {
|
|||||||
LOG.debug("Broker republishing to client <{}> topic <{}> qos <{}>, active {}",
|
LOG.debug("Broker republishing to client <{}> topic <{}> qos <{}>, active {}",
|
||||||
sub.getClientId(), sub.getTopicFilter(), qos, targetIsActive);
|
sub.getClientId(), sub.getTopicFilter(), qos, targetIsActive);
|
||||||
ByteBuffer message = origMessage.duplicate();
|
ByteBuffer message = origMessage.duplicate();
|
||||||
|
if (qos == AbstractMessage.QOSType.MOST_ONE && targetIsActive) {
|
||||||
|
//QoS 0
|
||||||
|
directSend(targetSession, topic, qos, message, false, null);
|
||||||
|
} else {
|
||||||
//QoS 1 or 2
|
//QoS 1 or 2
|
||||||
//if the target subscription is not clean session and is not connected => store it
|
//if the target subscription is not clean session and is not connected => store it
|
||||||
if (!targetSession.isCleanSession() && !targetIsActive) {
|
if (!targetSession.isCleanSession() && !targetIsActive) {
|
||||||
@@ -637,6 +641,7 @@ public class ProtocolProcessor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static QOSType lowerQosToTheSubscriptionDesired(Subscription sub, QOSType qos) {
|
static QOSType lowerQosToTheSubscriptionDesired(Subscription sub, QOSType qos) {
|
||||||
|
|||||||
Reference in New Issue
Block a user