boolean targetIsActive = this.connectionDescriptors.isConnected(sub.getClientId());
<BUG>LOG.debug("Broker republishing to client <{}> topicFilter <{}> qos <{}>, active {}",
sub.getClientId(), sub.getTopicFilter(), qos, targetIsActive);</BUG>
ByteBuffer message = origMessage.duplicate();
<BUG>if (targetIsActive) {
PublishMessage publishMsg = notRetainedPublish(topic, qos, message);</BUG>
if (qos != AbstractMessage.QOSType.MOST_ONE) {
int messageId = targetSession.nextPacketId();
targetSession.inFlightAckWaiting(guid, messageId);
publishMsg.setMessageID(messageId);

boolean targetIsActive = this.connectionDescriptors.isConnected(sub.getClientId());
ByteBuffer message = origMessage.duplicate();
if (targetIsActive) {
if (LOG.isDebugEnabled()) {
LOG.debug(
"Sending PUBLISH message to subscriber. MessageId = {}, mqttClientId = {}, topicFilter = {}, qos = {}, active = {}.",
pubMsg.getMessageID(), sub.getClientId(), sub.getTopicFilter(), qos, targetIsActive);
}
PublishMessage publishMsg = notRetainedPublish(topic, qos, message);
if (qos != AbstractMessage.QOSType.MOST_ONE) {
int messageId = targetSession.nextPacketId();
targetSession.inFlightAckWaiting(guid, messageId);
publishMsg.setMessageID(messageId);
