Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Golang Paho Client set to SetAutoReconnect, on re-connecting DefaultPublishHandler not being called

Hi Matt,

After digging around in the MQTT broker, we realized that the "CleanSession" flag was set to true.
So we made changes in the "Client Options" to set the flag to false.

// Set to Auto re-connect
options.SetAutoReconnect(true)
// Set Clean Session on broker to false
// Broker will remember the previous connection
options.CleanSession = false
With the above changes, the problem was fixed.

Thanks again for helping us look in the right direction.
David.





On Thu, Apr 6, 2023 at 3:27 PM Matt Brittan via paho-dev <paho-dev@xxxxxxxxxxx> wrote:
Hi David,

I'm not aware of any issues. If you believe there is a bug then please raise an issue (including as much info as possible - see the readme; ideally provide a minimal, reproducible, example).

Are you sure the broker is attempting to deliver messages? (If you have subscribed at QOS0 then the subscription will usually be lost when the connection drops).

Regards,
Matt


On Thu, 6 Apr 2023, 18:58 David Lee, <weekaung.lee@xxxxxxxxx> wrote:
Hi Everybody,

I have set the Paho client to auto-reconnect in case of losing connection.
However, on reconnecting, the DefaultPublishHandler stops working ( on the initial connection, the handler was working OK ).

So what seems to be wrong, or is there a bug.

Your help is very much appreciated.

Thanks,
David.
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/paho-dev
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/paho-dev

Back to the top