When trying to simulate client take over scenario using Swarm and having the Mqtt clients set with Will topic, upon reconnect the client does not have lwt topic associated with it. Could you let me know if there is any other way to retain the lwt topic even after reconnect.
Hi happy
and welcome to our community. It is an interesting behaviour that I would try to reproduce. What is your HiveMQ version and what is inside your scenario.xml please?
Thanks,
Dasha from HiveMQ Team
Hi Dasha
Thank you for your response.
The evaluation version of HiveMq Iām using is 4.7.4 and below is my scenario.xml where a mqtt client connection is made to the broker and Lwt topic is set for it and the autoreconnect toggle is set to true.
<brokers>
<broker id="b1">
<address>LBhostname</address>
<port>brokerportnumber</port>
<transport>TLS</transport>
</broker>
</brokers>
<clientGroups>
<clientGroup id="client-grp">
<clientIdPattern>sampleclient</clientIdPattern>
</clientGroup>
</clientGroups>
<topicGroups>
<topicGroup id="pub-sub">
<topicNamePattern>pub/lwt</topicNamePattern>
</topicGroup>
</topicGroups>
<stages>
<stage id="s1">
<lifeCycle id="connect-lifecycle" clientGroup="client-grp">
<delay duration="1s"/>
<connect broker="b1" credentials="xxxx" sessionExpiry="15m" cleanStart="false" autoReconnect="true">
<will topicGroup="pub-sub" message="0" qos="2" retain="true"/>
</connect>
</lifeCycle>
</stage>
<stage id="s2">
<lifeCycle id="s2.l1" clientGroup="client-grp">
<publish count="1" qos="2" message="1" topicGroup="pub-sub" rate="100/1s" retain="true"/>
</lifeCycle>
</stage>
<stages>
<stage id="s3">
<lifeCycle id="s3.l1" clientGroup="client-grp">
<delay duration="10m"/>
<disconnect/>
</lifeCycle>
</stage>
</scenario>
Thanks in advance!
Hi happy!
Thank you for sharing the scenario ā I have reproduced the behaviour and will raise an issue with our software engineering.
Thank you for being vigilant,
Kind regards,
Dasha from HiveMQ Team
This was resolved in the 4.8.2 maintenance release and should no longer be an issue.
Ryan from the HiveMQ Team