Skip to content

feat: LavinMQ integration #2634

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

prom3theu5
Copy link

@prom3theu5 prom3theu5 commented Feb 18, 2025

This pull request adds supporting documentation for the LavinMQ hosting integration in the Community Toolkit tracked by CommunityToolkit/Aspire#477


Internal previews

📄 File 🔗 Preview link
docs/community-toolkit/hosting-lavinmq.md .NET Aspire LavinMQ integration
docs/community-toolkit/overview.md Overview

@IEvangelist IEvangelist added the DO NOT MERGE Help prevent PR from mistakenly being merged. label Feb 20, 2025
# .NET Aspire LavinMQ integration

[!INCLUDE [includes-hosting](../includes/includes-hosting.md)]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing the banner include.

Suggested change
[!INCLUDE [banner](includes/banner.md)]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This article needs to be added to the TOC, under here: https://github.com/dotnet/docs-aspire/blob/main/docs/toc.yml#L289


## Hosting integration

The LavinMQ hosting integration models a LavinMQ server as the <xref:Aspire.Hosting.ApplicationModel.LavinMQContainerResource> type. To access this type and its APIs add the [📦 CommunityToolkit.Aspire.Hosting.LavinMQ](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.LavinMQ) NuGet package in the [app host](xref:dotnet/aspire/app-host) project.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The LavinMQ hosting integration models a LavinMQ server as the <xref:Aspire.Hosting.ApplicationModel.LavinMQContainerResource> type. To access this type and its APIs add the [📦 CommunityToolkit.Aspire.Hosting.LavinMQ](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.LavinMQ) NuGet package in the [app host](xref:dotnet/aspire/app-host) project.
The LavinMQ hosting integration models a LavinMQ server as the `Aspire.Hosting.ApplicationModel.LavinMQContainerResource` type. To access this type and its APIs add the [📦 CommunityToolkit.Aspire.Hosting.LavinMQ](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.LavinMQ) NuGet package in the [app host](xref:dotnet/aspire/app-host) project.

Comment on lines +72 to +73
var LavinMQ = builder.AddLavinMQ("messaging")
.WithDataVolume(isReadOnly: false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var LavinMQ = builder.AddLavinMQ("messaging")
.WithDataVolume(isReadOnly: false);
var LavinMQ = builder.AddLavinMQ("messaging")
.WithDataVolume(isReadOnly: false);

Comment on lines +90 to +93
var LavinMQ = builder.AddLavinMQ("messaging")
.WithDataBindMount(
source: @"C:\LavinMQ\Data",
isReadOnly: false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var LavinMQ = builder.AddLavinMQ("messaging")
.WithDataBindMount(
source: @"C:\LavinMQ\Data",
isReadOnly: false);
var LavinMQ = builder.AddLavinMQ("messaging")
.WithDataBindMount(
source: @"C:\LavinMQ\Data",
isReadOnly: false);

Comment on lines +115 to +118
LavinMQ is wire compatible with RabbitMQ.
This may introduce a bit of confusion at first, but think of LavinMQ as a RabbitMQ server with a different name in terms of the .NET client integration.
You can see an example of using the explicit RabbitMQ.Client [here](https://lavinmq.com/documentation/dot-net-sample-code)
To get started with the .NET Aspire RabbitMQ client integration, install the [📦 Aspire.RabbitMQ.Client](https://www.nuget.org/packages/Aspire.RabbitMQ.Client) NuGet package in the client-consuming project, that is, the project for the application that uses the LavinMQ client. The LavinMQ client integration registers an [IConnection](https://LavinMQ.github.io/LavinMQ-dotnet-client/api/LavinMQ.Client.IConnection.html) instance that you can use to interact with LavinMQ.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
LavinMQ is wire compatible with RabbitMQ.
This may introduce a bit of confusion at first, but think of LavinMQ as a RabbitMQ server with a different name in terms of the .NET client integration.
You can see an example of using the explicit RabbitMQ.Client [here](https://lavinmq.com/documentation/dot-net-sample-code)
To get started with the .NET Aspire RabbitMQ client integration, install the [📦 Aspire.RabbitMQ.Client](https://www.nuget.org/packages/Aspire.RabbitMQ.Client) NuGet package in the client-consuming project, that is, the project for the application that uses the LavinMQ client. The LavinMQ client integration registers an [IConnection](https://LavinMQ.github.io/LavinMQ-dotnet-client/api/LavinMQ.Client.IConnection.html) instance that you can use to interact with LavinMQ.
LavinMQ is wire compatible with RabbitMQ. This may introduce a bit of confusion at first, but think of LavinMQ as a RabbitMQ server with a different name in terms of the .NET client integration. You can see an example of using the explicit RabbitMQ.Client [here](https://lavinmq.com/documentation/dot-net-sample-code). To get started with the .NET Aspire RabbitMQ client integration, install the [📦 Aspire.RabbitMQ.Client](https://www.nuget.org/packages/Aspire.RabbitMQ.Client) NuGet package in the client-consuming project, that is, the project for the application that uses the LavinMQ client. The LavinMQ client integration registers an [IConnection](https://LavinMQ.github.io/LavinMQ-dotnet-client/api/LavinMQ.Client.IConnection.html) instance that you can use to interact with LavinMQ.

@IEvangelist IEvangelist removed the DO NOT MERGE Help prevent PR from mistakenly being merged. label Mar 27, 2025
@IEvangelist IEvangelist requested a review from Copilot July 18, 2025 19:41
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive documentation for the LavinMQ hosting integration in the .NET Aspire Community Toolkit. LavinMQ is a wire-compatible alternative to RabbitMQ that can be used as a message broker in .NET Aspire applications.

  • Adds complete documentation for the LavinMQ hosting integration including setup, configuration, and usage examples
  • Updates the community toolkit overview to include LavinMQ in the list of available integrations
  • Provides guidance on using RabbitMQ client libraries with LavinMQ due to wire compatibility

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
docs/community-toolkit/overview.md Adds LavinMQ to the list of hosting integrations with links to documentation and NuGet package
docs/community-toolkit/hosting-lavinmq.md New comprehensive documentation file covering LavinMQ integration setup, configuration, and usage
Comments suppressed due to low confidence (3)

docs/community-toolkit/hosting-lavinmq.md:45

  • The variable name 'LavinMQ' uses PascalCase, which is inconsistent with C# naming conventions. Variable names should use camelCase. Consider renaming to 'lavinMq' or 'lavinmq'.
var LavinMQ = builder.AddLavinMQ("messaging");

docs/community-toolkit/hosting-lavinmq.md:72

  • The variable name 'LavinMQ' uses PascalCase, which is inconsistent with C# naming conventions. Variable names should use camelCase. Consider renaming to 'lavinMq' or 'lavinmq'.
var LavinMQ = builder.AddLavinMQ("messaging")

docs/community-toolkit/hosting-lavinmq.md:90

  • The variable name 'LavinMQ' uses PascalCase, which is inconsistent with C# naming conventions. Variable names should use camelCase. Consider renaming to 'lavinMq' or 'lavinmq'.
var LavinMQ = builder.AddLavinMQ("messaging")


### LavinMQ container resource management plugin

LavinMQ includes a management interface by default
Copy link
Preview

Copilot AI Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence is incomplete and lacks proper punctuation. It should end with a period and provide more complete information about the management interface.

Copilot uses AI. Check for mistakes.


Because LavinMQ is wire compatible with AMQP 0.9.1, we can leverage the existing RabbitMQ health check integration.

The hosting integration relies on the [📦 AspNetCore.HealthChecks.RabbitMQ](https://www.nuget.org/packages/AspNetCore.HealthChecks.LavinMQ) NuGet package.
Copy link
Preview

Copilot AI Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link URL points to 'AspNetCore.HealthChecks.LavinMQ' but the link text shows 'AspNetCore.HealthChecks.RabbitMQ'. This inconsistency will result in a broken link since the URL should match the package name mentioned in the text.

Suggested change
The hosting integration relies on the [📦 AspNetCore.HealthChecks.RabbitMQ](https://www.nuget.org/packages/AspNetCore.HealthChecks.LavinMQ) NuGet package.
The hosting integration relies on the [📦 AspNetCore.HealthChecks.LavinMQ](https://www.nuget.org/packages/AspNetCore.HealthChecks.LavinMQ) NuGet package.

Copilot uses AI. Check for mistakes.

## See also

- [Send messages with RabbitMQ in .NET Aspire](/training/modules/send-messages-rabbitmq-dotnet-aspire-app)
- [RabbitMQ .NET Client docs](https://rabbitmq.github.io/LavinMQ-dotnet-client)
Copy link
Preview

Copilot AI Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The URL 'https://rabbitmq.github.io/LavinMQ-dotnet-client' appears to be incorrect. It should point to the RabbitMQ .NET client documentation, which would be 'https://rabbitmq.github.io/rabbitmq-dotnet-client' not 'LavinMQ-dotnet-client'.

Suggested change
- [RabbitMQ .NET Client docs](https://rabbitmq.github.io/LavinMQ-dotnet-client)
- [RabbitMQ .NET Client docs](https://rabbitmq.github.io/rabbitmq-dotnet-client)

Copilot uses AI. Check for mistakes.

LavinMQ is wire compatible with RabbitMQ.
This may introduce a bit of confusion at first, but think of LavinMQ as a RabbitMQ server with a different name in terms of the .NET client integration.
You can see an example of using the explicit RabbitMQ.Client [here](https://lavinmq.com/documentation/dot-net-sample-code)
To get started with the .NET Aspire RabbitMQ client integration, install the [📦 Aspire.RabbitMQ.Client](https://www.nuget.org/packages/Aspire.RabbitMQ.Client) NuGet package in the client-consuming project, that is, the project for the application that uses the LavinMQ client. The LavinMQ client integration registers an [IConnection](https://LavinMQ.github.io/LavinMQ-dotnet-client/api/LavinMQ.Client.IConnection.html) instance that you can use to interact with LavinMQ.
Copy link
Preview

Copilot AI Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The URL 'https://LavinMQ.github.io/LavinMQ-dotnet-client/api/LavinMQ.Client.IConnection.html' appears to be incorrect. Since LavinMQ is wire-compatible with RabbitMQ and uses the RabbitMQ client, this should point to the RabbitMQ client documentation.

Suggested change
To get started with the .NET Aspire RabbitMQ client integration, install the [📦 Aspire.RabbitMQ.Client](https://www.nuget.org/packages/Aspire.RabbitMQ.Client) NuGet package in the client-consuming project, that is, the project for the application that uses the LavinMQ client. The LavinMQ client integration registers an [IConnection](https://LavinMQ.github.io/LavinMQ-dotnet-client/api/LavinMQ.Client.IConnection.html) instance that you can use to interact with LavinMQ.
To get started with the .NET Aspire RabbitMQ client integration, install the [📦 Aspire.RabbitMQ.Client](https://www.nuget.org/packages/Aspire.RabbitMQ.Client) NuGet package in the client-consuming project, that is, the project for the application that uses the LavinMQ client. The LavinMQ client integration registers an [IConnection](https://www.rabbitmq.com/dotnet-api-guide.html) instance that you can use to interact with LavinMQ.

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants