You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LWT does not reach Pulsar topic, short cuts QoSPublishHandlers so Qos nor Retain function properly #937
Describe the bug
LWT does not function as expected. LWTs never reach Pulsar topics, instead the logic seems to be that when an LWT is fired it short cuts straight to finding each MQTT Connection with a subscription on that LWT's topic and then send the LWT directly to that client. This means that LWT's never even reach the QosPublishHandlers, which means an LWT's QoS will not be respected nor will the retain feature work for LWT messages because the QoSPublishHandler is responsible for the retain logic. Most importantly the LWT only reach other MoP connected clients. Currently if you try to send a retained LWT by killing a client and waiting for the connection to timeout, and then you reconnect you will not see the message via MQTT nor Pulsar. If you have a pulsar client connected and get an MQTT conenction to fire an LWT, you will never see it. The only way I can see LWTs is if I connect 2 MQTT clients, and kill one of them while the other has an active subscription on the other topic. Reading through the source code only confirms this behavior.
To Reproduce
Steps to reproduce the behavior:
Start a Pulsar client on a given topic, eg persistent://public/default/test_lwt
Create an MQTT client with an LWT on that topic, additionally set the retain flag
Create a second MQTT client with a subscription on that topic.
Kill the first MQTT client to prevent a graceful disconnect, wait for connection to timeout
The second MQTT client will see the LWT, the Pulsar client will NOT
Connect an additional MQTT client and subscribe on the test topic, you will not see a retained LWT on that topic.
Expected behavior
LWT QoS and retain should function the same as a regular MQTT message. LWTs should reach their destination Pulsar topic.
changed the title [-]LWT does not reach Pulsar topic, short cuts QoSPublishHandlers[/-][+]LWT does not reach Pulsar topic, short cuts QoSPublishHandlers so Qos nor Retain function properly[/+]on Apr 20, 2023
Activity
[-]LWT does not reach Pulsar topic, short cuts QoSPublishHandlers[/-][+]LWT does not reach Pulsar topic, short cuts QoSPublishHandlers so Qos nor Retain function properly[/+]tsturzl commentedon Apr 20, 2023
Working towards a PR on this issue currently.
tsturzl commentedon Dec 1, 2023
@mattisonchao @Technoboy- 5 min of your time please