Unable to complete forwarding packet to/from client/destination
Hi, I'm running IOXY using the following: ioxy mqtts -mqtts-port 8883 -mqtts-cert certs/verificationCert/verificationCert.pem -mqtts-key certs/verificationCert/verificationCert.key broker -mqtt-broker-tls -mqtt-broker-host xxx-xxx.iot.us-west-2.amazonaws.com -mqtt-broker-port 8883 -mqtt-broker-cert certs/aws-iot-certs/xxx.crt -mqtt-broker-key certs/aws-iot-certs/xxx.private.key
Using MQTT Explorer, I can connect to IOXY and subscribe to a topic.
However, when I publish to a topic, I can see IOXY log receipt of the packet, but the packet fails to make it to the AWS IoT console.
When I publish to a topic from the AWS IoT console, I can see IOXY log receipt of the packet, but it too is not forwarded on to MQTT Explorer.
I am not using the GUI as it gets stuck in 'starting...' on my machine.
I was able to step through the code (beautifully written) and find where the issue is primarily occurring.
In mqtt-packet.go's ForwardMQTTPacket() function, the go routine blocks on the wspipe <- b line, if you're not using the GUI.
I commented out the relevant code and was able to receive packets from the AWS IoT into MQTT Explorer, however, the reverse is still throwing errors. Will report back...
func (session *Session) ForwardMQTTPacket ... (
...
case *packets.PublishPacket:
...
checkError(err)
wspipe <- b
addMessage(db, Messages{session.id, p.TopicName, string(p.Payload), p.Dup, int(p.Qos), p.Retain, time.Now().Format("2006-01-02 15:04:05")})
...
}
Final update... Setting 'retain' to off in MQTT Explorer fixed the remaining issue. Probably something related to the default policy AWS IoT creates for a Thing.
I'll try to see if there's an elegant solution to the wspipe issue and submit a pull request.
I'm not a Go programmer, so it may take a bit.
Thanks for releasing this code!
Hello hope you are well, got a question about IOXY first of all I want to thank for this beautiful and amazing work, here is my question I'm trying to connect to my distant broker but there's no way of doing that have you got an idea on how I can connect to the distant broker Kind regards