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

MQTT5 CONNECT and PUBLISH Properties #199

Closed
pearmaster opened this issue May 25, 2023 · 7 comments · Fixed by #201
Closed

MQTT5 CONNECT and PUBLISH Properties #199

pearmaster opened this issue May 25, 2023 · 7 comments · Fixed by #201
Labels
enhancement New feature or request stale

Comments

@pearmaster
Copy link
Contributor

pearmaster commented May 25, 2023

Reason/Context

One of the defining features of MQTTv5 are Properties. (otherwise, you'd probably just use MQTT v3). Properties can be included in almost all MQTT packet types, and can form a significant part of an MQTTv5 API contract.

In issue asyncapi/spec#878 @fmvilas suggested that bindings are the appropriate construct for describing properties.

For more information, this page lists properties by packet type: http://www.steves-internet-guide.com/mqttv5-properties/

Description

I suggest adding additional fields to the MQTT5 server binding for MQTT CONNECT packets:

  • Maximum Packet Size
  • User Property
  • Session Expiry Interval (already included in the MQTT5 0.2.0 binding)

I suggest adding additional fields to the MQTT5 message bindings for MQTT PUBLISH packets:

I have a pull request that is about ready to go once this issue is approved (according to the contributing guidelines)

Side note: I've used the word "packet" above when the correct MQTT terminology is "message" to disambiguate from AsyncAPI "message" objects.

@pearmaster pearmaster added the enhancement New feature or request label May 25, 2023
@github-actions
Copy link

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@tomkralidis
Copy link

Relation to #198

@pearmaster
Copy link
Contributor Author

@fmvilas While I'm looking at this, I see that mqtt5 doesn't include the bindings that mqtt allows. Do you envision bindings being able to stack like this?:

servers:
  prod:
    bindings:
      mqtt:
        clientId: guest
      mqtt5:
        sessionExpiryInterval: 60

or should the relevant mqtt bindings be copied to the set of mqtt5 bindings?

@fmvilas
Copy link
Member

fmvilas commented May 30, 2023

Do you envision bindings being able to stack like this?

I think we somehow defined mqtt for MQTT <5 and mqtt5 for version 5 but, to be honest, I think this is a mistake we did in the past and both bindings should be merged into mqtt. It should be ok to put MQTT 5 stuff into the mqtt binding. We should just make it clear that it's only supported in versions >=5.

@pearmaster
Copy link
Contributor Author

I'll adapt my MR to merge both binding definitions (plus the new stuff) into mqtt.

@fmvilas
Copy link
Member

fmvilas commented May 31, 2023

Awesome, thanks! 🙏

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants