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

Fix directly mqtt for examples/mqtt-ws-server.rs #189

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aamalev
Copy link

@aamalev aamalev commented Feb 24, 2025

I'm not sure, but it looks like the example is trying to support the direct mqtt protocol.

I see an entry in the log (without a fix):
Protocol is unknown b"\x10\x1a\0\x04MQTT\x04\x02\0\x1e\0\x0emqttx_a5e44fe9"

If this is the case, then the marker b"MQTT" is slightly shifted by 4 bytes. Use the console client for verification:

$ mqttx pub -l mqtts --hostname 127.0.0.1 --port 8883 --mqtt-version 3.1.1 -t topic -m message --content-type text --insecure
✔ Connected
✔ Message published

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

Successfully merging this pull request may close these issues.

1 participant