Skip to content

Improve MQTT support#770

Merged
andreniggemann merged 34 commits intofuturefrom
feat/mqtt-features
Dec 4, 2025
Merged

Improve MQTT support#770
andreniggemann merged 34 commits intofuturefrom
feat/mqtt-features

Conversation

@andreniggemann
Copy link
Contributor

@andreniggemann andreniggemann commented Nov 5, 2025

Bugfixes:

  • The change in ConnectingToBrokerState prevents an application crash that were not uncommon during debugging

Cleanup:

  • Mostly typos in the string resources or non equal punctuation
  • Don't use the obsolete Payload Method and use ReadOnlySequence instead. To avoid unnecessary array copies methods deserializing the data have breaking signature changes
  • Remove Newtonoft.Json in favor of System.Text.Json

Features:

  • Add the option to add custom topics as the User by removing internal access modifiers from MqttTopic Serialize and Deserialize
  • Add Retain information for Publishing and Receiving messages
  • Support Mqtt5 response topics
  • Support unsubscribing from Topics, by removing or changing the resource
  • Support changing the broker without restarting the Resource Management, by a) providing a Reconnect method and b) handling changes to the relevant properties
  • Support diagnostic tracing of message contents, before and after deserialization

Copy link
Member

@dbeuchler dbeuchler left a comment

Choose a reason for hiding this comment

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

  • Missing summaries in public members
  • Several one-liners, bad readability of long lines. Separate them
  • Title of pull request

@andreniggemann andreniggemann changed the title Feat/mqtt features Improve MQTT support Nov 5, 2025
@1nf0rmagician 1nf0rmagician added the enhancement New feature or request label Nov 6, 2025
@1nf0rmagician 1nf0rmagician added this to the Framework 10.0.0 milestone Nov 6, 2025
Copy link
Member

@1nf0rmagician 1nf0rmagician left a comment

Choose a reason for hiding this comment

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

You already mentioned that there are breaking changes in here, would you put them in the migration guide please? 🙂

}
}

/// <summary>
Copy link
Member

Choose a reason for hiding this comment

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

would you put these properties next to the other props?


internal void DelayedConnectionAttempt()
{
ParallelOperations.ScheduleExecution(() => Connect(false).ContinueWith(t =>
Copy link
Member

Choose a reason for hiding this comment

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

Do you want to remember the operation id here to cancel it in the OnStop of the driver?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know included this in a slightly modified form.
I placed it in OnDisconnect which is called by OnStop. This has the benefit that it should also work for other situations where a disconnect is requested.

…ecause it's deprecated to access the payload as a byte[] switch the deserialize api to ArraySegment<byte>
…in connected state.

Can happen when debugger is connected
 Ignore misconfigured topics while sending.
 Add some logging and error handling
Add description attributes and xml comments.
Fix some formatting issues.
…se, including update to the new PayloadType of MQTTnet ReadOnlySequence.
@andreniggemann andreniggemann marked this pull request as draft December 1, 2025 17:08
@dbeuchler dbeuchler mentioned this pull request Dec 2, 2025
8 tasks
@dbeuchler dbeuchler mentioned this pull request Dec 2, 2025
8 tasks
@andreniggemann andreniggemann marked this pull request as ready for review December 4, 2025 08:14
@andreniggemann andreniggemann merged commit f64c2c9 into future Dec 4, 2025
3 checks passed
@andreniggemann andreniggemann deleted the feat/mqtt-features branch December 4, 2025 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants