Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add LavinMQ support #477 #486

Merged
merged 2 commits into from
Feb 19, 2025

Conversation

prom3theu5
Copy link
Contributor

This pull request adds support for a LavinMQ integration, including unit tests.

Documentation has been created under: dotnet/docs-aspire#2634

This fulfils the proposal outlined in #477

  • 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 (4000 total character limit, so don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Please note - Unlike RabbitMQ, LavinMQ does not support configuration utilising environmental variables.
As such, the default credentials of guest:guest are used in this implementation, with a virtual host of /
User management and virtual host management can be performed using the LavinMQ management UI, which is built in.
Utilising AddConnectionString, a custom post configured instance of lavinmq could be configured and passed down to consuming (reference) apps, but thats outside the scope of the actual container resource.

LavinMQ is wire compatible with AMQP 0-9-1, meaning we can reuse the RabbitMQ.Client to connect to this.
Its a drop in for it in reality - meaning the existing MassTransit extensions will work with this too.
As such - the health check added utilises the AspNetCore.HealthChecks.RabbitMQ package, as their isn't a native one for LavinMQ. It's fully functional though as I use it in a production AKS cluster with MassTransit.

@prom3theu5 prom3theu5 force-pushed the feature/lavinmq branch 2 times, most recently from 8739152 to 4c37fa3 Compare February 18, 2025 11:03
Update src/CommunityToolkit.Aspire.Hosting.LavinMQ/LavinMQHostingExtension.cs

Co-authored-by: Aaron Powell <[email protected]>
refactor: remove connection string builder.
@aaronpowell aaronpowell merged commit 6b47e96 into CommunityToolkit:main Feb 19, 2025
8 checks passed
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.

2 participants