Private serverURI As String = "tcp://111.111.111.111:1111"
If mqtt.Connected == False Then
Log("Client not connected")
mqtt.Initialize("mqtt", serverURI, Rnd(0, 999999999) & DateTime.Now)
Dim mo As MqttConnectOptions
mo.Initialize("", "")
mqtt.Connect2(mo)
Log("Client connected")
End If
If mqtt.Connected == True Then
mqtt.Subscribe("/Testing/Reply", 0)
mqtt.Publish2("/Testing/123",Array As Byte(0),mqtt.QOS_2_EXACTLY_ONCE,False)
'mqtt.Close
End If