diff --git a/cmd/checker/main.go b/cmd/checker/main.go index 2d9deee..16c236c 100644 --- a/cmd/checker/main.go +++ b/cmd/checker/main.go @@ -28,6 +28,9 @@ func main() { key := flag.String("key", "", "Path to TLS key file") insecure := flag.Bool("insecure", false, "Set to true to allow self signed certificates") mqtts := flag.Bool("mqtts", false, "Set to true to use MQTTS") + cleanSession := flag.Bool("cleanSession", true, "Set to true for clean MQTT sessions or false to keep session") + clientID := flag.String("clientID", "", "Custom MQTT clientID") + keepAliveTimeout := flag.Int64("keepAliveTimeout", 5000, "Set the amount of time (in seconds) that the client should wait before sending a PING request to the broker") flag.Parse() @@ -41,14 +44,17 @@ func main() { // General Client Config mqttClientConfig := MQTTClient.Config{ - TargetTopic: targetTopic, - Username: username, - Password: password, - Host: host, - Port: port, - QoS: qos, - Insecure: insecure, - MQTTS: mqtts, + TargetTopic: targetTopic, + Username: username, + Password: password, + Host: host, + Port: port, + QoS: qos, + Insecure: insecure, + MQTTS: mqtts, + CleanSession: cleanSession, + ClientID: clientID, + KeepAliveTimeout: keepAliveTimeout, } // If ca, cert, and key were set configure TLS