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

RabbitMQ.Client v7 breaks Aspire.RabbitMQ.Client component #3956

Open
eerhardt opened this issue Apr 25, 2024 · 3 comments · May be fixed by #6770
Open

RabbitMQ.Client v7 breaks Aspire.RabbitMQ.Client component #3956

eerhardt opened this issue Apr 25, 2024 · 3 comments · May be fixed by #6770
Labels
area-integrations Issues pertaining to Aspire Integrations packages rabbitmq Issues related to rabbitmq integrations
Milestone

Comments

@eerhardt
Copy link
Member

There have been some major binary breaking changes in https://www.nuget.org/packages/RabbitMQ.Client/7.0.0-alpha.5. Our component doesn't even load when using this version. The first error I get is:

MissingMethodException: Method not found: 'Void RabbitMQ.Client.ConnectionFactory.set_UseBackgroundThreadsForIO(Boolean)'.
Microsoft.Extensions.Configuration.Binder.SourceGeneration.<BindingExtensions_g>F4A9562478640BAD0160976753D96FF712B41D5A2B91D22C8BB8580DF176A8A3D__BindingExtensions.BindCore(IConfiguration configuration, ref ConnectionFactory instance, bool defaultValueIfNotFound, BinderOptions binderOptions)
Microsoft.Extensions.Configuration.Binder.SourceGeneration.<BindingExtensions_g>F4A9562478640BAD0160976753D96FF712B41D5A2B91D22C8BB8580DF176A8A3D__BindingExtensions.Bind_ConnectionFactory(IConfiguration configuration, object instance) in BindingExtensions.g.cs
Microsoft.Extensions.Hosting.AspireRabbitMQExtensions+<>c__DisplayClass5_0.<AddRabbitMQClient>g__CreateConnectionFactory|0(IServiceProvider sp) in AspireRabbitMQExtensions.cs

But I assume there will be many others after this.

We will need to handle this breaking change by splitting our component into 2, one for each major version.

  1. For the current Aspire.RabbitMQ.Client package, we should put a NuGet version limit on our dependency: [6.8.1,7.0.0). This way people won't be able to update to the 7.0.0 version, which will break their app.
  2. If RabbitMQ.Client ships an official 7.0.0 stable package during the .NET Aspire 8.x lifetime, we can add a new, forked component named Aspire.RabbitMQ.Client.v7 which will have a dependency on 7.0.0 and contain any updates so the .NET Aspire component will work with v7. People who explicitly want to use version 7 can opt into using this package.
  3. When .NET Aspire 9 ships, we can "swap" the dependencies around.
    • The Aspire.RabbitMQ.Client package will be updated to depend on version 7 of RabbitMQ.Client.
    • If RabbitMQ.Client v6 is still in support, we can create Aspire.RabbitMQ.Client.v6 which has the dependency limit [6.8.1, 7.0.0) and works with the version 6 of RabbitMQ.Client.
    • Aspire.RabbitMQ.Client.v7 will be dead-ended. We won't make new .NET Aspire 9 versions of this package.

Note that we shouldn't need to do this for every component when the underlying client library ships a new major version. We will only need to follow this model when major breaking changes come into the underlying client library such that our library doesn't even work anymore (or other major breaks that convince us it is worth doing this).

cc @sebastienros @radical @joperezr @DamianEdwards

@eerhardt eerhardt added the area-integrations Issues pertaining to Aspire Integrations packages label Apr 25, 2024
@eerhardt eerhardt added this to the 8.1 milestone Apr 25, 2024
eerhardt added a commit to eerhardt/aspire that referenced this issue Apr 26, 2024
Version 7 has binary breaking changes that cause the Aspire.RabbitMQ.Client component to fail loading with a MissingMethodException.

Contributes to dotnet#3956
eerhardt added a commit to eerhardt/aspire that referenced this issue Apr 26, 2024
Version 7 has binary breaking changes that cause the Aspire.RabbitMQ.Client component to fail loading with a MissingMethodException.

Contributes to dotnet#3956
eerhardt added a commit to eerhardt/aspire that referenced this issue Apr 26, 2024
Version 7 has binary breaking changes that cause the Aspire.RabbitMQ.Client component to fail loading with a MissingMethodException.

Contributes to dotnet#3956
eerhardt added a commit that referenced this issue Apr 26, 2024
Version 7 has binary breaking changes that cause the Aspire.RabbitMQ.Client component to fail loading with a MissingMethodException.

Contributes to #3956
danmoseley pushed a commit that referenced this issue Apr 26, 2024
Version 7 has binary breaking changes that cause the Aspire.RabbitMQ.Client component to fail loading with a MissingMethodException.

Contributes to #3956
@eerhardt eerhardt modified the milestones: 8.1, 8.2 Jul 8, 2024
@eerhardt eerhardt modified the milestones: 8.2, 9.0 Aug 22, 2024
@davidfowl davidfowl added feature rabbitmq Issues related to rabbitmq integrations labels Sep 8, 2024
@eerhardt eerhardt modified the milestones: 9.0, Backlog Sep 16, 2024
@davidfowl davidfowl removed the feature label Oct 16, 2024
@Dona278
Copy link
Contributor

Dona278 commented Nov 13, 2024

RabbitMQ.Client v7 is now release!

@umutbayrak1988
Copy link

RabbitMQ.Client v7 is now release!

And doesn't recognize CreateConnection() anymore :) I hope this will be fixed. I did rollback my upgrade.

@Dona278
Copy link
Contributor

Dona278 commented Nov 14, 2024

Until aspire team made all the changes described above we can't use them without creating a custom integration.

We have already did since the date of this issue and works good so if you needed it you can create a AddRabbitMQV7() method to add resource and use the new shipped api of the v7 (which have some breaking changes) to do connection and health checks.

eerhardt added a commit to eerhardt/aspire that referenced this issue Nov 22, 2024
@eerhardt eerhardt linked a pull request Nov 22, 2024 that will close this issue
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-integrations Issues pertaining to Aspire Integrations packages rabbitmq Issues related to rabbitmq integrations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants