Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Published message not received on subscriber #220

Closed
harshakhmk opened this issue Jan 30, 2024 · 2 comments
Closed

Published message not received on subscriber #220

harshakhmk opened this issue Jan 30, 2024 · 2 comments

Comments

@harshakhmk
Copy link

harshakhmk commented Jan 30, 2024

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
Copy link
Contributor

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
Copy link
Contributor

Closing from lack of activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants