For testing, I have created a client with clean sessin = false and setWill(WILL_TOPIC, WILL_MSG.getBytes(), 1, true); and ran the App. Later, i set setWill(WILL_TOPIC, WILL_MSG.getBytes(), 1, false); when i run the App, i receive the previously reatined LWT messages. How to stop receiving them?
How to stop receiving LWT retained message?
2.2k views Asked by Amrmsmb At
2
You could send a CONNECT message with “CleanSession=false” and “Will=true”, and sends an empty WILLTOPIC message
check this section 6.3