From 349287cf8c9682731da5c06e9f79b7807df81877 Mon Sep 17 00:00:00 2001 From: Mohammad Mahdi Date: Mon, 29 Sep 2025 16:50:55 +0330 Subject: [PATCH] Added aditional comments --- internal/mqtt/mqtt.go | 2 ++ 1 file changed, 2 insertions(+) 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: