Skip to content

fix: Make protocol_name optional and default to 'MQTT' for mqtt plugin#12831

Merged
Baoyuantop merged 7 commits into
apache:masterfrom
YapWC:fix-protocol-name-to-optional-for-mqtt-proxy
Dec 26, 2025
Merged

fix: Make protocol_name optional and default to 'MQTT' for mqtt plugin#12831
Baoyuantop merged 7 commits into
apache:masterfrom
YapWC:fix-protocol-name-to-optional-for-mqtt-proxy

Conversation

@YapWC

@YapWC YapWC commented Dec 22, 2025

Copy link
Copy Markdown
Contributor

Description

The mqtt protocol_name default to 'MQTT' as it is the standard protocol. And the protocol_name is now optional as it is not strictly required, reducing user configuration overhead.

Changes:

  • The mqtt protocol_name default to 'MQTT' and it is an optional attribute now.
  • Updated the preread validation logic to only perform protocol_name validation when protocol_name is set.
  • Implemented sanity test for mqtt schema check (for protocol_name & protocol_level).
  • Updated both the english and mandarin documentation for mqtt plugin.

Which issue(s) this PR fixes:

Fixes #11589

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

The mqtt protocol_name default to 'MQTT' as it is the standard protocol. And the protocol_name is now optional as it is not strictly required, reducing user configuration overhead.
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. doc Documentation things enhancement New feature or request plugin labels Dec 22, 2025
@YapWC YapWC changed the title Fix: Make protocol_name optional and default to 'MQTT' for mqtt plugin fix: Make protocol_name optional and default to 'MQTT' for mqtt plugin Dec 22, 2025
Baoyuantop
Baoyuantop previously approved these changes Dec 23, 2025
@Baoyuantop

Copy link
Copy Markdown
Contributor

Hi @YapWC, please fix the failed lint CI

@Baoyuantop Baoyuantop added the wait for update wait for the author's response in this issue/PR label Dec 24, 2025
@YapWC

YapWC commented Dec 24, 2025

Copy link
Copy Markdown
Contributor Author

Hi @YapWC, please fix the failed lint CI

It is fixed ya.

@Baoyuantop Baoyuantop added awaiting review and removed wait for update wait for the author's response in this issue/PR user responded labels Dec 24, 2025
Baoyuantop
Baoyuantop previously approved these changes Dec 24, 2025
ronething
ronething previously approved these changes Dec 25, 2025

@ronething ronething left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

others lgtm.

Comment thread t/stream-plugin/mqtt-proxy2.t Outdated
Comment thread apisix/stream/plugins/mqtt-proxy.lua Outdated
@Baoyuantop

Copy link
Copy Markdown
Contributor

Hi @YapWC, following up on the previous review comments. Please let us know if you have any updates. Thank you.

@Baoyuantop Baoyuantop added wait for update wait for the author's response in this issue/PR and removed awaiting review labels Dec 25, 2025
@YapWC
YapWC dismissed stale reviews from ronething and Baoyuantop via d81d0fd December 25, 2025 04:56
@YapWC

YapWC commented Dec 25, 2025

Copy link
Copy Markdown
Contributor Author

Hi @Baoyuantop here is the latest fixes, feel free to let me know if there is any else.

Baoyuantop
Baoyuantop previously approved these changes Dec 25, 2025
@Baoyuantop

Copy link
Copy Markdown
Contributor

Hi @YapWC, please fix lint error

@YapWC

YapWC commented Dec 25, 2025

Copy link
Copy Markdown
Contributor Author

Okay I think it is fixed this time.

@Baoyuantop Baoyuantop added awaiting review and removed wait for update wait for the author's response in this issue/PR user responded labels Dec 25, 2025
@Baoyuantop
Baoyuantop merged commit b5425e1 into apache:master Dec 26, 2025
38 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review doc Documentation things enhancement New feature or request plugin size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

help request: why configuring protocol_name in the mqtt-proxy plugin

4 participants