mirror of
https://github.com/wwhai/mqtt-benchmark.git
synced 2025-10-19 05:54:35 +08:00
Merge pull request #4 from linux4life798/master
Fixed MQTT ClientID formatting for Mosquitto with Auth Plugin compatibility
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