Skip to content

samples: net: mqtt_publisher: Enable MQTT 5.0 support #89040

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rlubos
Copy link
Collaborator

@rlubos rlubos commented Apr 24, 2025

Enable MQTT 5.0 support in the mqtt_publisher sample and make use of the topic aliasing feature.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the MQTT publisher sample to support MQTT 5.0 by introducing topic aliasing. Key changes include:

  • Adding new configuration flags (include_topic and aliases_enabled) and a topic alias definition.
  • Updating the event handler to check for broker-supported topic aliases.
  • Modifying the publish function to optionally use topic aliasing and setting the MQTT protocol version accordingly.
Files not reviewed (2)
  • samples/net/mqtt_publisher/README.rst: Language not supported
  • samples/net/mqtt_publisher/overlay-mqtt-5.conf: Language not supported

Enable MQTT 5.0 support in the mqtt_publisher sample and make use
of the topic aliasing feature.

Signed-off-by: Robert Lubos <[email protected]>
@rlubos rlubos force-pushed the net/enable-mqtt-5-in-sample branch from 5d38406 to e4e1506 Compare April 24, 2025 14:46
@rlubos
Copy link
Collaborator Author

rlubos commented Apr 24, 2025

Thanks @kartben, I've applied the suggestions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants