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

Trouble Implementing Tokio-util Decoder for MQTT Broker #46

Open
CianToole opened this issue Oct 25, 2021 · 0 comments
Open

Trouble Implementing Tokio-util Decoder for MQTT Broker #46

CianToole opened this issue Oct 25, 2021 · 0 comments

Comments

@CianToole
Copy link

I am pretty new to Rust and MQTT, and I was following this series of articles (https://hassamuddin.com/blog/rust-mqtt/overview/) on writing an async MQTT broker in Rust. As this article is a little dated, I was attempting to update it to use the most recent version of tokio-util (v0.6.8) and mqttrs (v0.4.1).

I think I have been able to update most of the code in that example located here (https://github.com/Heasummn/rust-mqtt), but I have run into some trouble trying to implement tokio_util::codec::Decoder. It seems that my problem comes from the lifetime attached to the Packet enum.

I was wondering if there was a potential workaround for this problem. Something to make the Decoder happy so I can see if everything else is working as it should be. Please let me know if you need any more information from me.

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

1 participant