Closed ACenTe25 closed 1 year ago
Are you testing out an unreleased version from GitHub? (Or using an example from GitHub with a released version from crates.io)?
Either way... The mqtt://
and mqtts://
prefixes have become de-facto standard in the industry, but the underlying Paho C library did not support them using tcp://
and ssl://
instead. I recently added the "standard" prefixes to the C library, which got released in Paho C v1.3.11.
This Rust lib has yet to be released with that support, though the GitHub repo has been updated in preparation for it coming soon. The new library should be out in a week or two.
Oh, I see... I was using the example from GitHub with a released version from crates.io. thanks for clarifying!
I was following the example in
examples/sync_consume.rs
and couldn't create aClient
due to aBad protocol
error.According to the documentation in
paho_mqtt::errors::BadProtocol
:However, the aforementioned example has (lines 65 - 74):
Which causes the error because the prefix in the example is
mqtt://
(line 67) which is invalid.Am I missing some feature or some important note in order to make the
mqtt://
prefix work, or is the example wrong?