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

Implement fallback for getting UAttributes from payload if MQTT5 is not supported #15

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ValMobBIllich
Copy link
Contributor

This fix enables using MQTT3.1 messages and still building a full UMessage from the MQTT message. This is particularly important for enabling UProtocol on systems that run threadX beacuse there is currently no MQTT5 capable client that runs on it.

@ValMobBIllich ValMobBIllich changed the title Inplement fallback for getting UAttributes from payload if MQTT5 is not supported Implement fallback for getting UAttributes from payload if MQTT5 is not supported Nov 22, 2024
Copy link

@stevenhartley stevenhartley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, if we have MQTT3.1, the entire uMessage is in the payload including the attributes correct? This looks fine to me but you need to push an update to the spec as well to match this change.

@stevenhartley
Copy link

@ValMobBIllich I created eclipse-uprotocol/up-spec#251, can you comment on it so I can assign the ticket to you?
Thanks.

@ValMobBIllich
Copy link
Contributor Author

If I understand correctly, if we have MQTT3.1, the entire uMessage is in the payload including the attributes correct? This looks fine to me but you need to push an update to the spec as well to match this change.

Yes! The sender would be required to serialize the UMessage according to the proto definition, then put the serialized byte array into the payload of their mqtt message and send it.

Enforcing MQTT5 compliance would be more elegant but at least on the threadX chips it would require an mqtt client that supports the full MQTT5 spec which currently doesnt seem to exist.

@PLeVasseur
Copy link
Contributor

Hey @ValMobBIllich -- would you like to consider using CloudEvents as suggested here?

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

Successfully merging this pull request may close these issues.

3 participants