diff --git a/internal/mqtt/mqtt.go b/internal/mqtt/mqtt.go index c805390..35b6fda 100644 --- a/internal/mqtt/mqtt.go +++ b/internal/mqtt/mqtt.go @@ -18,6 +18,8 @@ func NewClient(logger *zap.Logger, config *config.Config, csvHelper *csv.Helper) opts.SetKeepAlive(2 * time.Second) opts.SetDefaultPublishHandler(f) opts.SetPingTimeout(1 * time.Second) + // TODO: Check this option and see if it solves the re-subscribe on reconnect issue + // opts.SetCleanSession(false) opts.SetConnectionNotificationHandler(func(client mqtt.Client, notification mqtt.ConnectionNotification) { switch n := notification.(type) { case mqtt.ConnectionNotificationConnected: