A header-only MQTT client and server library for C++14 built on Boost.Asio, supporting MQTT v5.
mqtt_cpp is a header-only MQTT client and server library for C++14, built on Boost.Asio. It enables developers to implement MQTT protocol communication in their C++ applications, supporting both client and server roles with features like MQTT v5, TLS, and WebSocket. The library solves the need for a lightweight, high-performance MQTT solution in C++ without external dependencies beyond Boost.
C++ developers working on IoT applications, embedded systems, or network services that require MQTT messaging capabilities, particularly those already using Boost libraries.
Developers choose mqtt_cpp for its header-only design, which simplifies integration, and its robust support for MQTT v5 and asynchronous I/O via Boost.Asio, offering a flexible and efficient alternative to heavier MQTT implementations.
mqtt_cpp is a C++ library that provides both MQTT client and server functionality, enabling developers to implement MQTT communication in their applications. It is designed as a header-only library, simplifying integration into C++ projects that require IoT messaging or broker capabilities.
mqtt_cpp emphasizes simplicity and performance through a header-only design and reliance on established libraries like Boost.Asio, making it a robust choice for C++ developers needing MQTT capabilities.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
As a header-only library, mqtt_cpp eliminates separate compilation steps; simply include the headers as shown in the README's inclusion examples for quick integration.
It provides complete compatibility with MQTT version 5, enabling advanced features like property-based messaging and improved error handling, as documented in the wiki.
Built on Boost.Asio, it leverages asynchronous operations for efficient network communication, making it suitable for high-throughput messaging in IoT or server applications.
Supports both MQTT client and server roles within the same library, allowing flexible application architectures without external components, as evidenced by the example code.
Includes TLS and WebSocket support with compile-time flags, enabling secure communication and web-based integration, though setup requires additional library linkages.
The project is in serious bug-fix only status, with new features moving to async_mqtt, reducing its suitability for projects needing ongoing enhancements.
Requires Boost Libraries 1.74.0 or later, which adds complexity for projects not already using Boost or aiming for lightweight dependencies.
The broker functionality is experimental and subject to frequent interface changes without major version updates, making it unreliable for production use.
Enabling optional features like TLS or logging requires managing specific compile-time flags and additional library linkages, increasing configuration overhead.