Questions tagged [mqttnet]
78 questions
3
votes
1 answer
PFX Certificate Imported for TLS/SSL Encryption of MQTTnet Client Messages Works with Service but Fails with Xamarin UWP App
What We're Trying to Do
We in the process of encrypting our MQTT messages. We've been using MQTTnet. This supports TLS encryption, so it is a question of enabling this functionality for an existing solution. Our UWP Xamarin application and a .NET…

John Coffin
- 31
- 3
2
votes
2 answers
How to keep BackgroundService task receiving mqtt messages without Console.ReadLine()
In my ASP.Net Core 6 application, a BackgroundService task called MqttClientService runs a MQTTNet client that handles incoming mqqt messages and responds with a message to indicate it was successful.
I have gotten the sample console app from the…

keipala
- 768
- 2
- 7
- 19
2
votes
1 answer
MQTTnet TLS 1.2 Encrypted Server
I'm trying to create TLS 1.2-encrypted broker and clients with MQTTnet (let's say on port 2000). Below is my attempt:
using MQTTnet;
using MQTTnet.Client;
using MQTTnet.Server;
using System.Security.Authentication;
MqttFactory factory = new…

sfeng
- 93
- 1
- 7
2
votes
1 answer
MQTTnet - creating service for .net 6 Minimal Api
Could anybody provide example code to create injectable MQTTnet service to be used by API Controller in .net 6.0? I've done something like this:
MqttClientOptionsBuilder mqbuilder = new MqttClientOptionsBuilder()
.WithClientId("VTSCMgmntC")
…

Kal800
- 31
- 6
2
votes
2 answers
MQTTnet Connection Issue with HiveMQ Cloud
I am new to the MQTT world and I am trying to create a .Net 5.0 application that connects to a HiveMQ Cloud Broker.
I have created a free broker and I am able to connect to it with HiveMQ Websocket Client.
Here is a screenshot of my host.
I have…

A. Hasemeyer
- 1,452
- 1
- 18
- 47
2
votes
0 answers
ngx-mqtt multiple subscription not happening
I am trying to connect to MQTT server manually and then subscribe to multiple topics. I am able to connect manually, but not able to connect multiple topics with same MQTT service.
Library used ngx-mqtt for Angular
Problem/Issue :- When try to…

Inder R Singh
- 652
- 1
- 6
- 21
2
votes
1 answer
MQTTNET connection
I have written this application to use mqttnet library but connection failed.
How is it possible to get mqttnet with a trace?
Do you notice something wrong with the connection?
Here my code
var mqttClient = new MqttFactory(new…

doxdici
- 49
- 4
2
votes
1 answer
Unable to anonymously connect to Mosquitto 2.0.5 on Ubuntu
I have the Mosquitto 2.0.5 snap (version 511) running on an Ubuntu Core 18 system. I made no modifications to the configuration, nor pass another configuration to Mosquitto.
On that same system I am running a .NET 5 application, that uses MQTTnet to…

Marcel V.
- 53
- 9
2
votes
0 answers
Client certificate not working in xamarin.android
I'm trying to establish mtls connection using https://github.com/chkr1011/MQTTnet library in my xamarin.android project. During this process I encountered with such an exception in Init method on calling…

Yurii
- 21
- 2
1
vote
1 answer
How should an MQTTnet client's lifecycle be managed?
tl;dr: How can I avoid disposing the MQTTnet client while it is in use on another thread? Perhaps this pertains to any IDisposable, but in the case of ManagedMqttClient, there are also calls like IsConnected to worry about before async calls.
Note:…

Joe Schrag
- 855
- 8
- 23
1
vote
1 answer
Getting a connection error when using MQTTnet V5 and AWS IoT
I'm trying to simply connect to the AWS IoT Mqtt broker and get the following:
"Error while authenticating. Extended authentication handler is not yet supported"
The policies for the thing is set for subscription, connection, receive and publish. I…

FrankL
- 11
- 2
1
vote
0 answers
How to achieve redundancy within my mqttnet broker?
I want to build an mqttnet broker that support high availability.I want to add the redundancy feature to my servers.
I am building a mqtt broker with 2 nodes and i want to replicate messages between the 2 nodes.
The nodes are servers with some basic…

IMEN KAABACHI
- 11
- 1
1
vote
1 answer
Missing MQTTnet.Client namespaces after upgrading to the latest version - any solutions?
I am trying to develop a C# application that contains a managed MQTT client. I am using MQTTnet and MQTTnet.Extensions.ManagedClient. I have seen some examples of how to do this using MQTTnet version 3.0.16. I have downloaded and built a project…

Hamilton Woods
- 63
- 1
- 6
1
vote
2 answers
Mqtt Last Will & Testament (LWT) message - issues with the timing of the LWT message
I have a Windows Service running on multiple boxes, and publishing messages to the HiveMq Mqtt Broker.
Good so far.
However, I noticed that when I manually STOP one of those Win Services - my browser Mqtt client IMMEDIATELY gets the last Last Will…

bob.mazzo
- 5,183
- 23
- 80
- 149
1
vote
1 answer
MqttNet version 4.1.3.563 Basic example
Following this example I have now therefore been required to update the MQTT.NET from version 3 (that works thanks the provided help) to version 4.
A very basic set of capabilities would be enough:
Connect to an adress with a timeout
Check if the…

Luca
- 918
- 2
- 13
- 30