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

Feature/275 masstransit rabbitmq client integration #278

Open
wants to merge 39 commits into
base: main
Choose a base branch
from

Conversation

MichielBrys
Copy link

@MichielBrys MichielBrys commented Nov 21, 2024

**Closes #275 **

Host & client projects for masstransit rabbitmq. And example project. Readme's are in the src projects.

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 (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

Other information

Michiel Brys added 2 commits November 21, 2024 15:16
@MichielBrys
Copy link
Author

MichielBrys commented Nov 21, 2024

@dotnet-policy-service agree

@fredimachado
Copy link
Contributor

fredimachado commented Nov 21, 2024

Hi @MichielBrys , I noticed the AddMassTransitClient method and I was just wondering what would happen if, in the future we also have Aspire packages for other transports like CommunityToolkit.Aspire.Client.MassTransit.ServiceBus for example.

Maybe it could be named AddMassTransitRabbitMqClient in order to not make it ambiguous?

Also, maybe the settings class could have a more specific name as well like MassTransitRabbitMqClientSettings.

Copy link
Member

@aaronpowell aaronpowell left a comment

Choose a reason for hiding this comment

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

Left some comments and suggestions to bring it inline with more of the design of the Toolkit projects.

Also, you'll need to ensure that the NuGet packages are added to the Directory.Packages.props with their correct versions since we use CPM to ensure everything is consistently versioned.

MichielBrys and others added 19 commits November 22, 2024 08:25
…AppHost/CommunityToolkit.Aspire.Hosting.MassTransit.RabbitMQ.AppHost.csproj

Co-authored-by: Aaron Powell <[email protected]>
…AppHost/CommunityToolkit.Aspire.Hosting.MassTransit.RabbitMQ.AppHost.csproj

Co-authored-by: Aaron Powell <[email protected]>
…AppHost/CommunityToolkit.Aspire.Hosting.MassTransit.RabbitMQ.AppHost.csproj

Co-authored-by: Aaron Powell <[email protected]>
…nityToolkit.Aspire.Hosting.MassTransit.RabbitMQ.csproj

Co-authored-by: Aaron Powell <[email protected]>
…nityToolkit.Aspire.Hosting.MassTransit.RabbitMQ.csproj

Co-authored-by: Aaron Powell <[email protected]>
…ityToolkit.Aspire.Client.MassTransit.RabbitMQ.csproj

Co-authored-by: Aaron Powell <[email protected]>
…ityToolkit.Aspire.Client.MassTransit.RabbitMQ.csproj

Co-authored-by: Aaron Powell <[email protected]>
…ityToolkit.Aspire.Client.MassTransit.RabbitMQ.csproj

Co-authored-by: Aaron Powell <[email protected]>
…ityToolkit.Aspire.Client.MassTransit.RabbitMQ.csproj

Co-authored-by: Aaron Powell <[email protected]>
…nityToolkit.Aspire.Hosting.MassTransit.RabbitMQ.csproj

Co-authored-by: Aaron Powell <[email protected]>
…ransitRabbitMQHostingExtensions.cs

Co-authored-by: Aaron Powell <[email protected]>
…ransitRabbitMQHostingExtensions.cs

Co-authored-by: Aaron Powell <[email protected]>
@MichielBrys MichielBrys marked this pull request as draft November 22, 2024 16:32
@anoordover
Copy link
Contributor

Can you explain what this solution adds on the ease of use as compared to https://github.com/anoordover/MassTransitJobConsumer?
What would the impact of using this component be for my example?

@MichielBrys
Copy link
Author

MichielBrys commented Nov 25, 2024

Thanks for the reviews, I read them and indeed realised the hosting package isn't doing anything extra so I got rid of it. Currently only have the client which uses the connection string from the .AddRabbitMQ().

I'm thinking it would be pretty usefull to have in the community toolkit and I'd like to expand it to support all the implementations that work with masstransit so people have a nice wrapper to use with aspire to easily set up masstransit

I also fixed the nuget versioning to use the Directory.Packages.props file.

@MichielBrys MichielBrys marked this pull request as ready for review November 25, 2024 11:45
@aaronpowell
Copy link
Member

Thanks for the reviews, I read them and indeed realised the hosting package isn't doing anything extra so I got rid of it. Currently only have the client which uses the connection string from the .AddRabbitMQ().

I'm thinking it would be pretty usefull to have in the community toolkit and I'd like to expand it to support all the implementations that work with masstransit so people have a nice wrapper to use with aspire to easily set up masstransit

I also fixed the nuget versioning to use the Directory.Packages.props file.

Given that it doesn't provide any functionality over the standard RabbitMQ integration, I don't see that there's a need for the hosting integration.

The client integration should be able to use the connection string provided by the standard RabbitMQ integration just fine.

MichielBrys and others added 5 commits November 26, 2024 09:01
…ServiceDefaults/CommunityToolkit.Aspire.Hosting.MassTransit.RabbitMQ.ServiceDefaults.csproj

Co-authored-by: Aaron Powell <[email protected]>
…kit.Aspire.MassTransit.RabbitMQ.csproj

Co-authored-by: Aaron Powell <[email protected]>
@MichielBrys
Copy link
Author

Thanks for the reviews, I read them and indeed realised the hosting package isn't doing anything extra so I got rid of it. Currently only have the client which uses the connection string from the .AddRabbitMQ().
I'm thinking it would be pretty usefull to have in the community toolkit and I'd like to expand it to support all the implementations that work with masstransit so people have a nice wrapper to use with aspire to easily set up masstransit
I also fixed the nuget versioning to use the Directory.Packages.props file.

Given that it doesn't provide any functionality over the standard RabbitMQ integration, I don't see that there's a need for the hosting integration.

The client integration should be able to use the connection string provided by the standard RabbitMQ integration just fine.

Agreed its the client package I meant that could be nice to have in the toolkit, the hosting one I already removed yesterday.

@MichielBrys MichielBrys changed the title Feature/275 masstransit rabbitmq Feature/275 masstransit rabbitmq client integration Nov 26, 2024
@aaronpowell
Copy link
Member

It's been removed from the solution, but the files are still on disk:

image

These can be deleted, along with the .idea folder.

@aaronpowell
Copy link
Member

Also, can the examples be moved into a sub-folder of examples, such as examples/masstransit-rabbitmq (and a solution folder to match), so that it's consistent with the others.

@MichielBrys
Copy link
Author

Could someone merge the pr? I don't have write access I think. Thanks :)

@aaronpowell
Copy link
Member

Could someone merge the pr? I don't have write access I think. Thanks :)

Yeah. CodeQL didn't run for some reason so I'll have to override that to merge.

Copy link
Member

@aaronpowell aaronpowell left a comment

Choose a reason for hiding this comment

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

I just noticed that there's no tests.

Can you add some tests for the integration. Since this is a client integration, check out https://github.com/CommunityToolkit/Aspire/tree/main/tests/CommunityToolkit.Aspire.Meilisearch.Tests as an example for how to write client integration tests.

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.

Hosting & client package for masstransit rabbitmq
5 participants