Skip to content

New Integration Component: CommunityToolkit.Aspire.Hosting.Mosquitto - #1520

Open
IgorShaposhnikov wants to merge 5 commits into
CommunityToolkit:mainfrom
IgorShaposhnikov:feature/mqtt
Open

New Integration Component: CommunityToolkit.Aspire.Hosting.Mosquitto#1520
IgorShaposhnikov wants to merge 5 commits into
CommunityToolkit:mainfrom
IgorShaposhnikov:feature/mqtt

Conversation

@IgorShaposhnikov

Copy link
Copy Markdown

Closes #1519

This PR introduces a new hosting integration for Eclipse Mosquitto (CommunityToolkit.Aspire.Hosting.Mosquitto). It allows developers to seamlessly orchestrate and run an Eclipse Mosquitto MQTT broker inside a container as part of their .NET Aspire distributed application topology.

Overview of Changes

  • Added CommunityToolkit.Aspire.Hosting.Mosquitto project to the toolkit.
  • Implemented AddMosquitto extension method on IDistributedApplicationBuilder.
  • Configured a TCP endpoint mapping to the default MQTT port 1883.
  • Integrated a protocol-level health check to ensure the resource only reports healthy once it actively accepts TCP/MQTT traffic.
  • Added support for data persistence (WithDataVolume and WithDataBindMount) and configuration overrides (mosquitto.conf).
  • Added comprehensive unit/integration tests and XML documentation.

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
  • Docs are written
  • Added description of major feature to project description for NuGet package
  • Tests for the changes have been added (for bug fixes / features)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Other information

The implementation pins the eclipse-mosquitto image from docker.io to the stable, fully-versioned release tag 2.0.22 rather than using a floating tag, ensuring deterministic local builds for developers.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1520

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1520"

@IgorShaposhnikov

Copy link
Copy Markdown
Author

@IgorShaposhnikov please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@dotnet-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@dotnet-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@dotnet-policy-service agree company="Microsoft"

Contributor License Agreement

@dotnet-policy-service agree

@IgorShaposhnikov IgorShaposhnikov changed the title Feature/mqtt New Integration Component: CommunityToolkit.Aspire.Hosting.Mosquitto Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New Integration Component: CommunityToolkit.Aspire.Hosting.Mosquitto

1 participant