eclipse / paho.mqtt.rust

paho.mqtt.rust
Other
511 stars 102 forks source link

Published message not received on subscriber #220

Closed harshakhmk closed 2 months ago

harshakhmk commented 6 months ago

Hi, I am testing few examples mentioned here with a publisher and subscriber https://github.com/eclipse/paho.mqtt.rust/blob/master/examples/sync_publish.rs https://github.com/eclipse/paho.mqtt.rust/blob/master/examples/sync_consume.rs There was no build issue with code, but publisher is successfully sending message, but subscriber is not receiving any message On closer inspection, I have seen publisher default connection to v3 broker and subscriber got connected to v4 version, I tried changing the version of mqtt broker in Client, however I was getting error like it is not supported to set the version

fpagliughi commented 6 months ago

It would be difficult to help without any more information than that. Are you able to publish and subscribe to the broker using some available clients like mosquitto_pub & mosquitto_sub? Or did you try a GUI MQTT client to test the connections and view the traffic?

As for versions, the byte/integer version numbers that are put on the wire are:

3 -> MQTT v3.1 4 -> MQTT v3.1.1 5 -> MQTT v5

So, technically, 4 is a version of MQTT v3.

fpagliughi commented 2 months ago

Closing from lack of activity.