mirror of
https://github.com/wwhai/mqtt-benchmark.git
synced 2025-10-04 07:16:41 +08:00
Fixed MQTT ClientID for compatibility with Mosquitto + Auth Plugin
This commit is contained in:
@@ -118,7 +118,7 @@ func (c *Client) pubMessages(in, out chan *Message, doneGen, donePub chan bool)
|
||||
|
||||
opts := mqtt.NewClientOptions().
|
||||
AddBroker(c.BrokerURL).
|
||||
SetClientID(fmt.Sprintf("mqtt-benchmark-%v-%v", time.Now(), c.ID)).
|
||||
SetClientID(fmt.Sprintf("mqtt-benchmark-%v-%v", time.Now().Format(time.RFC3339Nano), c.ID)).
|
||||
SetCleanSession(true).
|
||||
SetAutoReconnect(true).
|
||||
SetOnConnectHandler(onConnected).
|
||||
|
Reference in New Issue
Block a user