Closed jason-grimme closed 4 weeks ago
Thank you for your feedback. We have indeed reproduced this issue and found that we did not handle the reconnect
in the pub
command. We will optimize this in the next version.
Updated to https://github.com/emqx/MQTTX/releases/tag/v1.10.0. Thanks for your feedback.
What did I do
Background: My broker disconnects the client if the topic is not authorized or invalid (I think this is normal) When I use CLI to publish with an invalid topic, it results in the CLI retrying indefinitely and never exits
What happened
The CLI indefinitely retries and never exits. Looking at the
--debug
log I can see that the client is disconnected and it reconnects.Expected
When I do same in GUI, the client is disconnected and no retry is done. But in the CLI it is stuck in loop reconnecting and trying to publish the same (invalid) thing. If infinite retry is expected, then there should be a flag to opt-out of retry. Or to specify the number of retries. I tried using
--message-expiry-interval 1
and--maximum-reconnect-times 1
but these had no impact.Environment
More detail