📄️ Connecting with TLS and Allowing Invalid TLS Certificates
In certain development or testing scenarios, you might need to connect to an MQTT broker that uses TLS but has an invalid or self-signed certificate. The HiveMQtt client library provides an option to disable the TLS certificate check upon connection, which can be useful in these situations.
📄️ Custom Client Certificates
The HiveMQtt client has the ability to use custom client certificates to identify itself to the MQTT broker that it connect to.
📄️ Configure Logging
The HiveMQtt package uses NLog and can be configured with a configuration file (NLog.config). Having this file in the same directory of your executable will configure the HiveMQtt logger to output as configured:
📄️ Securely Connect to a Broker with Basic Authentication Credentials
To securely connect to an MQTT Broker with basic authentication credentials, use the UserName and Password fields in HiveMQClientOptions:
📄️ How to Debug
When working with the HiveMQtt client, there may be instances where deeper insight into the internal workings of the client is necessary to troubleshoot or understand its behavior. One of the most effective ways to gain this insight is through TRACE level logging.
📄️ How to set a Last Will & Testament
The Last Will and Testament support of MQTT can be used to notify subscribers that your client is offline.
📄️ Wait on an Event
Use a TaskCompletionSource in your event handlers to wait for events to complete.