Skip to main content
HiveMQ

HiveMQtt

The C# MQTT Client for .NET

Build reliable, high-performance IoT applications with the official HiveMQ MQTT client for .NET. Fully MQTT 5.0 compliant and designed for enterprise-grade deployments.

NuGet VersionNuGet DownloadsLicense
📦

Install in Seconds

dotnet add package HiveMQtt

Available on NuGet • Supports .NET 6, 7, 8, and 9

Why Choose HiveMQtt?

Built by the MQTT experts at HiveMQ for production-grade IoT applications

🚀

MQTT 5.0 Ready

Fully compliant with the latest MQTT 5.0 specification. Supports all QoS levels, retained messages, and session management.

High Performance

Asynchronous design optimized for high-throughput and low-latency. Benchmarked for production IoT workloads.

🔒

Enterprise Security

TLS/SSL, X.509 certificates, SecureString password storage, and secure WebSocket (wss://) support.

🌐

Flexible Transport

TCP and WebSocket connections (ws:// and wss://). Works across firewalls and HTTP-only environments.

🎯

Developer Friendly

Intuitive API with smart defaults, builder patterns, and extensive event system for fine-grained control.

📦

Multi-Platform

Supports .NET 6, 7, 8, and 9. Works on Windows, Linux, macOS, and containerized environments.

Simple, Intuitive API

Get connected and start publishing messages in minutes. The HiveMQtt client features a clean, builder-based API that makes MQTT integration straightforward.

  • ✓ Async/await pattern throughout
  • ✓ Fluent builder configuration
  • ✓ Event-driven message handling
  • ✓ Automatic reconnection support
  • ✓ Per-subscription handlers
View Full Documentation
QuickStart.cs
using HiveMQtt.Client;
using HiveMQtt.MQTT5.Types;

// Connect to HiveMQ Cloud (or any MQTT broker)
var options = new HiveMQClientOptionsBuilder()
.WithBroker("your-cluster.hivemq.cloud")
.WithPort(8883)
.WithUseTls(true)
.WithUserName("your-username")
.WithPassword("your-password")
.Build();

var client = new HiveMQClient(options);

// Handle incoming messages
client.OnMessageReceived += (sender, args) => {
Console.WriteLine($"Received: {args.PublishMessage.PayloadAsString}");
};

await client.ConnectAsync();
await client.SubscribeAsync("sensors/temperature");
await client.PublishAsync("sensors/temperature", "23.5°C");

Built for Real-World IoT

From edge devices to enterprise systems, HiveMQtt powers mission-critical applications

🏭

Industrial IoT

Connect factory equipment, sensors, and PLCs to your enterprise systems.

🏠

Smart Buildings

Build automation systems for HVAC, lighting, and energy management.

🚗

Connected Vehicles

Real-time telemetry and fleet management for automotive applications.

⚕️

Healthcare

Medical device connectivity and patient monitoring systems.

Powered by HiveMQ

HiveMQ is the enterprise MQTT platform trusted by leading organizations worldwide. With 99.999% uptime, support for millions of concurrent connections, and seamless integration with enterprise systems, HiveMQ is the foundation for your IoT success.

200M+Concurrent Connections
1M+Messages/Second
99.999%Uptime SLA

Ready to Build?

Start building your IoT application today with HiveMQtt and HiveMQ Cloud.
Free tier includes up to 100 device connections — no credit card required.