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 Adapter Binding #674

Merged
merged 29 commits into from
Sep 14, 2023
Merged

Mqtt5 Adapter Binding #674

merged 29 commits into from
Sep 14, 2023

Conversation

xiazhvera
Copy link
Contributor

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@xiazhvera xiazhvera marked this pull request as ready for review September 5, 2023 17:17
*
* @return a MqttClientConnection
*/
public MqttClientConnection NewConnection(MqttClientConnectionEvents callbacks) throws MqttException
Copy link
Contributor

Choose a reason for hiding this comment

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

I wish these were not public and instead there was a constructor in MqttConnection that took a 5 client and used package-private functionality to construct the config and make the native call.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a constructor in MqttConnection. However, as MqttConnection and Mqtt5Client is not in the same package, it is not possible to use a package-private config, instead I add a getClientOptions for Mqtt5Client so that the MqttConnection could access the config.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, after thinking about it. This is a better workflow as it reduced the chance that the Mqtt5Client user to access the Mqtt3 interface. I will also update it for CPP and Python.

@xiazhvera xiazhvera merged commit 6288900 into main Sep 14, 2023
@xiazhvera xiazhvera deleted the mqtt5to3adapter branch September 14, 2023 18:23
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.

2 participants