Questions tagged [mqttnet]

78 questions
1
vote
1 answer

MQTTNet UseApplicationMessageReceivedHandler not firing

I am doing a POC so here is the quick and dirty code. I use MQTT.fx desktop client to test Pub/Sub to my MQTT Server. Works fine. I can publish/subscribe to my topic. I can publish from another mqtt client and I get the messages. When using…
jbrabant
  • 245
  • 4
  • 11
0
votes
0 answers

MQTTnet and AWS IOT - can connect and publish, can't subscribe

I am trying to write a POC using MQTTnet and AWS IOT. I can successfully connect and publish messages, but as soon as I subscribe the connection is closed with MqttClientDisconnectedException topic is "vin/my-vin" MQTTnet 4.2.1.781 .NET 7 -…
Jason
  • 86,222
  • 15
  • 131
  • 146
0
votes
1 answer

Mqttnet managedMqttClient processed vs received Application message

I recently tried implementing a mqttclient in c# using the mqttnet package. I realized, that there are three events which can be invoked by the…
macman
  • 21
  • 6
0
votes
0 answers

MQTTnet establishing connections to clients for both publishing and subscribing

I'm very new to MQTT, but have been using .Net for years. I have an existing process that gets data and sends commands to an external device. But I have a new customer that wants that data to be sent to their process using MQTT. I understand the…
Alexa Kirk
  • 152
  • 10
0
votes
0 answers

MqttNet - How to implement MQTT server (broker) to receive messages that were published by MQTT client

I want to get sensor data that are published by a mqtt client. The client connect to my server but I cannot found any event on MqttServer that handle published messages by the client. Is it possible or is there any example about it ? P.S: In the old…
hmfarimani
  • 531
  • 1
  • 8
  • 13
0
votes
2 answers

Does C# maintain queue for events?

I am working on an IoT application and using C# events to subscribe to MQTT messages. I am using a library that raises an event when a message is received. I have written an Asynchronous EventHandler for processing the message. The rate at which the…
Hem Bhagat
  • 323
  • 3
  • 12
0
votes
1 answer

Async handler for MQTTnet subscription handler crashes WPF application when updating ViewModel

I have a WPF application built using .NET 7 Windows Desktop SDK, that uses MQTTnet. I have a ViewModel which defines some properties using INotifyPropertyChanged, and contains an MQTTnet client: public class MyViewModel : INotifyPropertyChanged { …
Hydrargyrum
  • 3,378
  • 4
  • 27
  • 41
0
votes
0 answers

MQTTCLient PublishAsync() goes to WaitingForActivation

I am using Mqttnet Client. When publishing Data to the mosquitto broker after few seconds the task status is WaitingForActivation. Connect: var clientOptions= new MqttClientOptionsBuilder() …
Sena
  • 13
  • 4
0
votes
1 answer

Retained messages in the MQTT Message Protocol

I'm working with two MQTT client libs: One for Angular 14 (in my browser application), and the other is Mqtt 4.1.4 .Net client for Framework 4.6. At one point I was publishing an MQTT test message from my front-end application with retain: true.…
bob.mazzo
  • 5,183
  • 23
  • 80
  • 149
0
votes
0 answers

How to use MQTTnet WebSocket with selfhosted OWIN API Controller?

I need to build an MQTTnet Broker/Server, that is spoken to through a website on e.g. wss://host.domain.tld/mqtt. This is already working in .NET Core, like this: app.UseEndpoints(endpoints => { …
0
votes
1 answer

Mqttnet client data crashes the subscribe code

I got the sample Mqttnet code (for publish and subcribe) from GitHub https://github.com/dotnet/MQTTnet/tree/master/Samples/Client I am sending MQTT message to hivemq.cloud free private cluster port 8883. Also, I am using the HIVEMQ web client to…
userb00
  • 589
  • 1
  • 8
  • 16
0
votes
1 answer

Changing WindowsForms UI in a Task c#

I wrote a windows forms application where I receive messages with MQTTNet from the broker. I want to change the UI according to the received message. But I couldn't make it happen. I took the client code from the MQTTNet github page. When I receive…
grkngs09
  • 3
  • 1
0
votes
0 answers

Cannot connect to Mqtt Broker from .Net client running in Windows Service

I have created a Mqtt.Net Windows Service in C#, using Framework 4.6.1. The service on my local Win 10 box works perfectly, publishing/subscribing to messages to/from the EMQX Broker. However once I deploy my x64 release version to another box,…
bob.mazzo
  • 5,183
  • 23
  • 80
  • 149
0
votes
1 answer

MQTTnet - Can't Read Incoming Messages From Subscribed Topic (Blazor MAUI)

I have recently been learning about MQTT technology. As a .NET developer, I am trying to use MQTTnet to integrate MQTT protocol into a new software project. MQTTnet is a .NET C# package which can be found here: GitHub: MQTTnet. I am using BLE…
Jaden
  • 69
  • 5
0
votes
1 answer

Testing MQTTnet with c# - code is just bailing out on connect

I'm having trouble getting some basic C# code running with MQTTnet 4.1 examples. Using this test code at https://blog.behroozbc.ir/mqtt-client-with-mqttnet-4-and-c , and also referencing the samples at…
bob.mazzo
  • 5,183
  • 23
  • 80
  • 149