DEV Community

Cover image for 📮 MqttTopicBuilder: build valid and verified MQTT topics
Pierre Bouillon
Pierre Bouillon

Posted on • Updated on

📮 MqttTopicBuilder: build valid and verified MQTT topics

👋 Everyone !

Lately I worked with MQTT in C# for a big project in my company. I already had the opportunity to work with it in the past, mostly in C and Python, and with other developers familiar with it.

However MQTT is not widely used in our projects and for most of the people I worked with, it was something new. Understanding its core concepts and limits was fun but sometimes they were feeling a lack of support from the libraries used for the communication while configuring them.

In fact, it is true that topics are strings values but embedding specific logic. Therefor they are much more complex that just strings and could be represented by a logic structure.

That's why I built MqttTopicBuilder: to encapsulate the inner logic of MQTT's topics and to provide help to developers who may want a more robust support for it.

The project

GitHub logo pBouillon / MqttTopicBuilder

📮 Build valid and verified MQTT topics

MqttTopicBuilder is a tool allowing developers to delegate topic construction's logic to another entity to safely build MQTT topics without checking every constraints required by the protocol.

To help people mastering MQTT and this tool, I wrote a small wiki both on MQTT Topics and on MqttTopicBuilder's usage.

The project is build in C# with .Net Core 3.1 but I will work on making it available for as much configurations as possible.

The test coverage for the project is around 95% (without including exceptions constructors in the coverage profile).

It is also available on NuGet as a ready-to-use library for your C# projects !

Hidden goal: diving into the open-source

I find open-source awesome: it allows people all around the world to exchange and collaborate, the culture it spreads, etc. I'm a huge fan.

I already had a GitHub profile but no projects really open-source ready (no wiki, no contributing guide, etc.)

With this project, I tried to prepare as many resources as I can from a wiki to a contributing guide and even a CI/CD.

With it, I hope to help a little the open-source community and provide a better tool for people who may need it, with high code and quality standards.

Last words

You got it, contributions are welcomed ! But so is your feedback. I'm still a young developer and far from mastering everything, I would gladly hear your advice if you have any !


Cover photo by Oleg Magni from Pexels

Top comments (0)