Related to an existing integration?
No
Existing integration
CommunityToolkit.Aspire
Overview
Problem Description
Developers building .NET Aspire applications need a seamless, out-of-the-box way to host and orchestrate an Eclipse Mosquitto MQTT broker during local development. Currently, setting up Mosquitto in .NET Aspire requires manual container resource configuration, custom health checks, and manual connection string injection, which introduces boilerplate code across projects.
Proposed Solution
Introduce CommunityToolkit.Aspire.Hosting.Mosquitto to the community toolkit to easily run Eclipse Mosquitto in a container. The integration should:
- Expose the standard MQTT endpoint on port
1883 (protocol tcp).
- Include a protocol-level health check ensuring the resource only reports healthy once it actively accepts MQTT connections.
- Automatically inject a connection string formatted as
mqtt://host:port into referencing resources.
- Provide simple extension methods for pinning host ports (
port: 1883), persisting data (WithDataVolume() / WithDataBindMount()), and overriding the default mosquitto.conf via container files.
Usage example
var builder = DistributedApplication.CreateBuilder(args);
var mqtt = builder.AddMosquitto("mqtt")
.WithDataVolume();
builder.AddProject<Projects.MyApp>("myapp")
.WithReference(mqtt)
.WaitFor(mqtt);
builder.Build().Run();
Breaking change?
No
Alternatives
Alternatives Considered
Manually configuring generic containers using builder.AddContainer("mosquitto", "eclipse-mosquitto"), which requires developers to write their own health checks and connection string mapping logic manually.
Additional Context
The upstream image should target the immutable, fully-versioned eclipse-mosquitto image from docker.io (e.g., pinned to tag 2.0.22 instead of floating tags) to ensure build reliability.
Help us help you
Yes, I'd like to be assigned to work on this item
Related to an existing integration?
No
Existing integration
CommunityToolkit.Aspire
Overview
Problem Description
Developers building .NET Aspire applications need a seamless, out-of-the-box way to host and orchestrate an Eclipse Mosquitto MQTT broker during local development. Currently, setting up Mosquitto in .NET Aspire requires manual container resource configuration, custom health checks, and manual connection string injection, which introduces boilerplate code across projects.
Proposed Solution
Introduce
CommunityToolkit.Aspire.Hosting.Mosquittoto the community toolkit to easily run Eclipse Mosquitto in a container. The integration should:1883(protocoltcp).mqtt://host:portinto referencing resources.port: 1883), persisting data (WithDataVolume()/WithDataBindMount()), and overriding the defaultmosquitto.confvia container files.Usage example
Breaking change?
No
Alternatives
Alternatives Considered
Manually configuring generic containers using
builder.AddContainer("mosquitto", "eclipse-mosquitto"), which requires developers to write their own health checks and connection string mapping logic manually.Additional Context
The upstream image should target the immutable, fully-versioned
eclipse-mosquittoimage fromdocker.io(e.g., pinned to tag2.0.22instead of floating tags) to ensure build reliability.Help us help you
Yes, I'd like to be assigned to work on this item