According to MQTT defect "
Fix tokens for QoS 0 getting lost. #563" (
https://github.com/eclipse/paho.mqtt.java/pull/563 ) this is a known problem when using Qualify-of-Service (QoS) level zero (0).
There are two workarounds:One workaround is to configure the MQTT publsher to have QoS=1 or QoS=2 in Connection Configuration setting:
<setting name="willQos" val="1" />
Use "1" or "2" to not lose messages.
A future update to the MQTT paho libraries to fix this will be incorporated into StreamBase product when available. To see if this has been addressed in a specific StreamBase release, please check the Release Notes.
Another workaround is to downgrade the Paho library version dependency in a StreamBase 10 project by editing the
pom.xml to have:
<dependency>
<groupId>org.eclipse.paho</groupId>
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
<version>1.1.0</version>
</dependency>
Note that since this is a downgrade, there may be other issues in the 1.1.0 version which you may need to understand.