-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/update mqtt3 to mqtt4 (#140)
* Update MQTTnet package to version 4.3.6.1152 This commit upgrades the MQTTnet package from version 3.0.9 to 4.3.6.1152 in both the main API project and the test project. This update is intended to leverage new features and improvements in the latest version of MQTTnet. * Update MQTT message handling in CapabilitiesServiceTest Refactor MQTT message handling to use the ApplicationMessageReceivedAsync event instead of UseApplicationMessageReceivedHandler. This aligns with updated MQTTnet library practices and ensures better async event handling. Removed the unnecessary MQTTnet.Client import. * Update MQTTnet namespace import. Switched from MQTTnet.Client.Publishing to MQTTnet.Client to resolve namespace discrepancies and ensure compatibility with updated library versions. * Update MQTT connection timeout method Replaced deprecated `.WithCommunicationTimeout()` method with `.WithTimeout()` for setting MQTT communication timeout. Removed unused `MQTTnet.Client.Options` import statement for cleanup. * Refactor MQTT message publishing for clarity and consistency Refactor the MQTT message publishing process by switching to the appropriate MQTTnet.Protocol namespace and improving code readability. Utilize the `MqttQualityOfServiceLevel.ExactlyOnce` for enhanced clarity and ensure proper formatting and spacing throughout. * Switch to async handler for MQTT message receiving Updated the application message handling in PingServiceTest to use the asynchronous event handler. This ensures better responsiveness and non-blocking execution while verifying response codes in the unit tests. --------- Co-authored-by: Oliver Rahner <[email protected]>
- Loading branch information
1 parent
c374ce2
commit b061aa3
Showing
7 changed files
with
22 additions
and
20 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
agrirouter-sdk-dotnet-standard-api/Exception/CouldNotSendMqttMessageException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
using System; | ||
using MQTTnet.Client.Publishing; | ||
using MQTTnet.Client; | ||
|
||
namespace Agrirouter.Api.Exception | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters