On retained republish message adapt the QoS to the one specified during subscription (fix issue #411)

This commit is contained in:
andsel
2018-06-28 00:26:42 +02:00
parent 99226aadbd
commit 88e0ccf20e
6 changed files with 86 additions and 44 deletions
@@ -31,7 +31,7 @@ public interface IMessagesStore {
class StoredMessage implements Serializable {
private static final long serialVersionUID = 1755296138639817304L;
final MqttQoS m_qos;
private MqttQoS m_qos;
final byte[] m_payload;
final String m_topic;
private boolean m_retained;
@@ -44,6 +44,11 @@ public interface IMessagesStore {
m_topic = topic;
}
public void setQos(MqttQoS qos) {
this.m_qos = qos;
}
public MqttQoS getQos() {
return m_qos;
}