From fd4ccd97bb77527ea54b39bf4bac08e002ae607f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Oct 2025 19:51:42 +0000 Subject: [PATCH 1/7] Initial plan From 46f8fc2dde9883f8cdcfc57456d53fd78edd8916 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Oct 2025 20:14:08 +0000 Subject: [PATCH 2/7] Flip RabbitMQ.Client and MongoDB.Driver to use v7 and v3 by default Co-authored-by: eerhardt <8291187+eerhardt@users.noreply.github.com> --- Aspire.slnx | 8 ++++---- .../TestShop/BasketService/BasketService.csproj | 2 +- .../TestShop/OrderProcessor/OrderProcessor.csproj | 2 +- .../mongo/Mongo.ApiService/Mongo.ApiService.csproj | 2 +- .../Aspire.MongoDB.Driver.v2.csproj} | 11 ++++++----- .../ConfigurationSchema.json | 0 .../api/Aspire.MongoDB.Driver.cs | 0 .../Aspire.MongoDB.Driver.csproj | 9 ++++----- .../AspireMongoDBDriverExtensions.cs | 7 ------- .../Aspire.RabbitMQ.Client.v6.csproj} | 9 +++++---- .../ConfigurationSchema.json | 0 .../api/Aspire.RabbitMQ.Client.cs | 0 .../Aspire.RabbitMQ.Client.csproj | 5 ++--- .../Aspire.RabbitMQ.Client/ConfigurationSchema.json | 12 ++++-------- src/Components/README.md | 12 ++++++------ .../Aspire.Hosting.MongoDB.Tests.csproj | 2 +- .../Aspire.Hosting.RabbitMQ.Tests.csproj | 2 +- .../Aspire.MongoDB.Driver.v2.Tests.csproj} | 2 +- .../Aspire.RabbitMQ.Client.v6.Tests.csproj} | 4 ++-- .../RepoTesting/Directory.Packages.Helix.props | 4 ++-- 20 files changed, 41 insertions(+), 52 deletions(-) rename src/Components/{Aspire.MongoDB.Driver.v3/Aspire.MongoDB.Driver.v3.csproj => Aspire.MongoDB.Driver.v2/Aspire.MongoDB.Driver.v2.csproj} (80%) rename src/Components/{Aspire.MongoDB.Driver.v3 => Aspire.MongoDB.Driver.v2}/ConfigurationSchema.json (100%) rename src/Components/{Aspire.MongoDB.Driver.v3 => Aspire.MongoDB.Driver.v2}/api/Aspire.MongoDB.Driver.cs (100%) rename src/Components/{Aspire.RabbitMQ.Client.v7/Aspire.RabbitMQ.Client.v7.csproj => Aspire.RabbitMQ.Client.v6/Aspire.RabbitMQ.Client.v6.csproj} (86%) rename src/Components/{Aspire.RabbitMQ.Client.v7 => Aspire.RabbitMQ.Client.v6}/ConfigurationSchema.json (100%) rename src/Components/{Aspire.RabbitMQ.Client.v7 => Aspire.RabbitMQ.Client.v6}/api/Aspire.RabbitMQ.Client.cs (100%) rename tests/{Aspire.MongoDB.Driver.v3.Tests/Aspire.MongoDB.Driver.v3.Tests.csproj => Aspire.MongoDB.Driver.v2.Tests/Aspire.MongoDB.Driver.v2.Tests.csproj} (95%) rename tests/{Aspire.RabbitMQ.Client.v7.Tests/Aspire.RabbitMQ.Client.v7.Tests.csproj => Aspire.RabbitMQ.Client.v6.Tests/Aspire.RabbitMQ.Client.v6.Tests.csproj} (89%) diff --git a/Aspire.slnx b/Aspire.slnx index d2ce1f43147..69c17390e6a 100644 --- a/Aspire.slnx +++ b/Aspire.slnx @@ -26,7 +26,7 @@ - + @@ -36,7 +36,7 @@ - + @@ -392,7 +392,7 @@ - + @@ -402,7 +402,7 @@ - + diff --git a/playground/TestShop/BasketService/BasketService.csproj b/playground/TestShop/BasketService/BasketService.csproj index 39706131b47..481d40e7d7e 100644 --- a/playground/TestShop/BasketService/BasketService.csproj +++ b/playground/TestShop/BasketService/BasketService.csproj @@ -18,7 +18,7 @@ - + diff --git a/playground/TestShop/OrderProcessor/OrderProcessor.csproj b/playground/TestShop/OrderProcessor/OrderProcessor.csproj index b22a0aab903..e5bb01408a0 100644 --- a/playground/TestShop/OrderProcessor/OrderProcessor.csproj +++ b/playground/TestShop/OrderProcessor/OrderProcessor.csproj @@ -15,7 +15,7 @@ - + diff --git a/playground/mongo/Mongo.ApiService/Mongo.ApiService.csproj b/playground/mongo/Mongo.ApiService/Mongo.ApiService.csproj index fa252be52b7..83ba5929180 100644 --- a/playground/mongo/Mongo.ApiService/Mongo.ApiService.csproj +++ b/playground/mongo/Mongo.ApiService/Mongo.ApiService.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/Components/Aspire.MongoDB.Driver.v3/Aspire.MongoDB.Driver.v3.csproj b/src/Components/Aspire.MongoDB.Driver.v2/Aspire.MongoDB.Driver.v2.csproj similarity index 80% rename from src/Components/Aspire.MongoDB.Driver.v3/Aspire.MongoDB.Driver.v3.csproj rename to src/Components/Aspire.MongoDB.Driver.v2/Aspire.MongoDB.Driver.v2.csproj index b00e58b1e6b..b14ee4746af 100644 --- a/src/Components/Aspire.MongoDB.Driver.v3/Aspire.MongoDB.Driver.v3.csproj +++ b/src/Components/Aspire.MongoDB.Driver.v2/Aspire.MongoDB.Driver.v2.csproj @@ -5,9 +5,10 @@ true $(ComponentDatabasePackageTags) MongoDB $(SharedDir)MongoDB_300px.png - A generic MongoDB client that integrates with Aspire. - + A generic MongoDB client (version 2+) that integrates with Aspire. + $(NoWarn);CS8002 + $(DefineConstants);MONGODB_V2 false @@ -29,12 +30,12 @@ - - + + - + diff --git a/src/Components/Aspire.MongoDB.Driver.v3/ConfigurationSchema.json b/src/Components/Aspire.MongoDB.Driver.v2/ConfigurationSchema.json similarity index 100% rename from src/Components/Aspire.MongoDB.Driver.v3/ConfigurationSchema.json rename to src/Components/Aspire.MongoDB.Driver.v2/ConfigurationSchema.json diff --git a/src/Components/Aspire.MongoDB.Driver.v3/api/Aspire.MongoDB.Driver.cs b/src/Components/Aspire.MongoDB.Driver.v2/api/Aspire.MongoDB.Driver.cs similarity index 100% rename from src/Components/Aspire.MongoDB.Driver.v3/api/Aspire.MongoDB.Driver.cs rename to src/Components/Aspire.MongoDB.Driver.v2/api/Aspire.MongoDB.Driver.cs diff --git a/src/Components/Aspire.MongoDB.Driver/Aspire.MongoDB.Driver.csproj b/src/Components/Aspire.MongoDB.Driver/Aspire.MongoDB.Driver.csproj index fe2ee2991d8..e1c250300f5 100644 --- a/src/Components/Aspire.MongoDB.Driver/Aspire.MongoDB.Driver.csproj +++ b/src/Components/Aspire.MongoDB.Driver/Aspire.MongoDB.Driver.csproj @@ -6,9 +6,8 @@ $(ComponentDatabasePackageTags) MongoDB $(SharedDir)MongoDB_300px.png A generic MongoDB client that integrates with Aspire. - + $(NoWarn);CS8002 - $(DefineConstants);MONGODB_V2 @@ -18,12 +17,12 @@ - - + + - + diff --git a/src/Components/Aspire.MongoDB.Driver/AspireMongoDBDriverExtensions.cs b/src/Components/Aspire.MongoDB.Driver/AspireMongoDBDriverExtensions.cs index 46169ce63d4..f6766a25660 100644 --- a/src/Components/Aspire.MongoDB.Driver/AspireMongoDBDriverExtensions.cs +++ b/src/Components/Aspire.MongoDB.Driver/AspireMongoDBDriverExtensions.cs @@ -170,14 +170,7 @@ private static void AddHealthCheck( builder.TryAddHealthCheck( healthCheckName, healthCheck => healthCheck.AddMongoDb( -#if MONGODB_V2 settings.ConnectionString, -#else - serviceKey is null - ? sp => sp.GetRequiredService() - : sp => sp.GetRequiredKeyedService(serviceKey), - _ => MongoUrl.Create(settings.ConnectionString).DatabaseName, -#endif healthCheckName, null, null, diff --git a/src/Components/Aspire.RabbitMQ.Client.v7/Aspire.RabbitMQ.Client.v7.csproj b/src/Components/Aspire.RabbitMQ.Client.v6/Aspire.RabbitMQ.Client.v6.csproj similarity index 86% rename from src/Components/Aspire.RabbitMQ.Client.v7/Aspire.RabbitMQ.Client.v7.csproj rename to src/Components/Aspire.RabbitMQ.Client.v6/Aspire.RabbitMQ.Client.v6.csproj index 6e256525c4e..58fa9ce2800 100644 --- a/src/Components/Aspire.RabbitMQ.Client.v7/Aspire.RabbitMQ.Client.v7.csproj +++ b/src/Components/Aspire.RabbitMQ.Client.v6/Aspire.RabbitMQ.Client.v6.csproj @@ -4,8 +4,9 @@ $(AllTargetFrameworks) true $(ComponentDatabasePackageTags) rabbitmq amqp - A RabbitMQ client (version 7+) that integrates with Aspire, including health checks, logging, and telemetry. + A RabbitMQ client (version 6+) that integrates with Aspire, including health checks, logging, and telemetry. $(NoWarn);SYSLIB1100;SYSLIB1101 + $(DefineConstants);RABBITMQ_V6 false @@ -26,17 +27,17 @@ - + - + - + diff --git a/src/Components/Aspire.RabbitMQ.Client.v7/ConfigurationSchema.json b/src/Components/Aspire.RabbitMQ.Client.v6/ConfigurationSchema.json similarity index 100% rename from src/Components/Aspire.RabbitMQ.Client.v7/ConfigurationSchema.json rename to src/Components/Aspire.RabbitMQ.Client.v6/ConfigurationSchema.json diff --git a/src/Components/Aspire.RabbitMQ.Client.v7/api/Aspire.RabbitMQ.Client.cs b/src/Components/Aspire.RabbitMQ.Client.v6/api/Aspire.RabbitMQ.Client.cs similarity index 100% rename from src/Components/Aspire.RabbitMQ.Client.v7/api/Aspire.RabbitMQ.Client.cs rename to src/Components/Aspire.RabbitMQ.Client.v6/api/Aspire.RabbitMQ.Client.cs diff --git a/src/Components/Aspire.RabbitMQ.Client/Aspire.RabbitMQ.Client.csproj b/src/Components/Aspire.RabbitMQ.Client/Aspire.RabbitMQ.Client.csproj index 25d8b221d9d..f0596936203 100644 --- a/src/Components/Aspire.RabbitMQ.Client/Aspire.RabbitMQ.Client.csproj +++ b/src/Components/Aspire.RabbitMQ.Client/Aspire.RabbitMQ.Client.csproj @@ -6,7 +6,6 @@ $(ComponentDatabasePackageTags) rabbitmq amqp A RabbitMQ client that integrates with Aspire, including health checks, logging, and telemetry. $(NoWarn);SYSLIB1100;SYSLIB1101 - $(DefineConstants);RABBITMQ_V6 @@ -15,12 +14,12 @@ - + - + diff --git a/src/Components/Aspire.RabbitMQ.Client/ConfigurationSchema.json b/src/Components/Aspire.RabbitMQ.Client/ConfigurationSchema.json index ed0c4a41049..ca42826fcfe 100644 --- a/src/Components/Aspire.RabbitMQ.Client/ConfigurationSchema.json +++ b/src/Components/Aspire.RabbitMQ.Client/ConfigurationSchema.json @@ -45,12 +45,12 @@ }, "ConsumerDispatchConcurrency": { "type": "integer", - "description": "Set to a value greater than one to enable concurrent processing. For a concurrency greater than one 'RabbitMQ.Client.IBasicConsumer' will be offloaded to the worker thread pool so it is important to choose the value for the concurrency wisely to avoid thread pool overloading. 'RabbitMQ.Client.IAsyncBasicConsumer' can handle concurrency much more efficiently due to the non-blocking nature of the consumer. Defaults to 1." + "description": "Set to a value greater than one to enable concurrent processing. For a concurrency greater than one 'RabbitMQ.Client.IAsyncBasicConsumer' will be offloaded to the worker thread pool so it is important to choose the value for the concurrency wisely to avoid thread pool overloading. 'RabbitMQ.Client.IAsyncBasicConsumer' can handle concurrency much more efficiently due to the non-blocking nature of the consumer. Defaults to 1." }, "ContinuationTimeout": { "type": "string", "pattern": "^-?(\\d{1,7}|((\\d{1,7}[\\.:])?(([01]?\\d|2[0-3]):[0-5]?\\d|([01]?\\d|2[0-3]):[0-5]?\\d:[0-5]?\\d)(\\.\\d{1,7})?))$", - "description": "Amount of time protocol operations (e.g. queue.declare) are allowed to take before timing out." + "description": "Amount of time protocol operations (e.g. queue.declare) are allowed to take before timing out." }, "DefaultAddressFamily": { "enum": [ @@ -103,10 +103,6 @@ ], "description": "TLS versions enabled by default: TLSv1.2, v1.1, v1.0." }, - "DispatchConsumersAsync": { - "type": "boolean", - "description": "Set to true will enable a asynchronous consumer dispatcher which is compatible with 'RabbitMQ.Client.IAsyncBasicConsumer'. Defaults to false." - }, "Endpoint": { "type": "object", "properties": { @@ -216,9 +212,9 @@ "type": "string", "description": "The host to connect to." }, - "MaxMessageSize": { + "MaxInboundMessageBodySize": { "type": "integer", - "description": "Maximum allowed message size, in bytes, from RabbitMQ. Corresponds to the rabbit.max_message_size setting." + "description": "Maximum allowed message size, in bytes, from RabbitMQ. Corresponds to the ConnectionFactory.DefaultMaxMessageSize setting." }, "NetworkRecoveryInterval": { "type": "string", diff --git a/src/Components/README.md b/src/Components/README.md index f1d1e2369f1..215260b71b1 100644 --- a/src/Components/README.md +++ b/src/Components/README.md @@ -42,12 +42,12 @@ In the situation that a client library associated with an Aspire client integrat To understand how this will work, an example of this is the `RabbitMQ.Client` library made many large breaking changes between version `6.8.1` and `7.0.0`. To handle this: -1. For the current `Aspire.RabbitMQ.Client` package, we 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. When `RabbitMQ.Client` ships an official `7.0.0` stable package during the .NET Aspire `8.x` lifetime, we can add a new, forked client integration named `Aspire.RabbitMQ.Client.v7` which will have a dependency on `7.0.0` and contain any updates so the .NET Aspire client integration will work with v7. People who explicitly want to use v7 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 v7 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. +1. For .NET Aspire 8.x, the `Aspire.RabbitMQ.Client` package had a NuGet version limit on the dependency: `[6.8.1,7.0.0)` to support v6 of RabbitMQ.Client. +2. During the .NET Aspire `8.x` and `9.x` lifetime, `Aspire.RabbitMQ.Client.v7` was available for users who wanted to opt into using v7 of RabbitMQ.Client. +3. Starting with .NET Aspire 13, the dependencies have been "swapped": + - The `Aspire.RabbitMQ.Client` package now depends on v7 of `RabbitMQ.Client` (version 7.1.2). + - For users who need to continue using v6, `Aspire.RabbitMQ.Client.v6` is available with the dependency limit `[6.8.1, 7.0.0)`. + - `Aspire.RabbitMQ.Client.v7` has been dead-ended. There are no new .NET Aspire 13 versions of this package. ## Icon diff --git a/tests/Aspire.Hosting.MongoDB.Tests/Aspire.Hosting.MongoDB.Tests.csproj b/tests/Aspire.Hosting.MongoDB.Tests/Aspire.Hosting.MongoDB.Tests.csproj index 895bf53fe89..ff78511994f 100644 --- a/tests/Aspire.Hosting.MongoDB.Tests/Aspire.Hosting.MongoDB.Tests.csproj +++ b/tests/Aspire.Hosting.MongoDB.Tests/Aspire.Hosting.MongoDB.Tests.csproj @@ -6,7 +6,7 @@ - + diff --git a/tests/Aspire.Hosting.RabbitMQ.Tests/Aspire.Hosting.RabbitMQ.Tests.csproj b/tests/Aspire.Hosting.RabbitMQ.Tests/Aspire.Hosting.RabbitMQ.Tests.csproj index b89475a5de9..5dc6463da84 100644 --- a/tests/Aspire.Hosting.RabbitMQ.Tests/Aspire.Hosting.RabbitMQ.Tests.csproj +++ b/tests/Aspire.Hosting.RabbitMQ.Tests/Aspire.Hosting.RabbitMQ.Tests.csproj @@ -7,7 +7,7 @@ - + diff --git a/tests/Aspire.MongoDB.Driver.v3.Tests/Aspire.MongoDB.Driver.v3.Tests.csproj b/tests/Aspire.MongoDB.Driver.v2.Tests/Aspire.MongoDB.Driver.v2.Tests.csproj similarity index 95% rename from tests/Aspire.MongoDB.Driver.v3.Tests/Aspire.MongoDB.Driver.v3.Tests.csproj rename to tests/Aspire.MongoDB.Driver.v2.Tests/Aspire.MongoDB.Driver.v2.Tests.csproj index 86e4c114dfa..e7d803012e7 100644 --- a/tests/Aspire.MongoDB.Driver.v3.Tests/Aspire.MongoDB.Driver.v3.Tests.csproj +++ b/tests/Aspire.MongoDB.Driver.v2.Tests/Aspire.MongoDB.Driver.v2.Tests.csproj @@ -13,7 +13,7 @@ - + diff --git a/tests/Aspire.RabbitMQ.Client.v7.Tests/Aspire.RabbitMQ.Client.v7.Tests.csproj b/tests/Aspire.RabbitMQ.Client.v6.Tests/Aspire.RabbitMQ.Client.v6.Tests.csproj similarity index 89% rename from tests/Aspire.RabbitMQ.Client.v7.Tests/Aspire.RabbitMQ.Client.v7.Tests.csproj rename to tests/Aspire.RabbitMQ.Client.v6.Tests/Aspire.RabbitMQ.Client.v6.Tests.csproj index 22c9af17989..3907237fc34 100644 --- a/tests/Aspire.RabbitMQ.Client.v7.Tests/Aspire.RabbitMQ.Client.v7.Tests.csproj +++ b/tests/Aspire.RabbitMQ.Client.v6.Tests/Aspire.RabbitMQ.Client.v6.Tests.csproj @@ -5,7 +5,7 @@ - + @@ -13,7 +13,7 @@ - + diff --git a/tests/Shared/RepoTesting/Directory.Packages.Helix.props b/tests/Shared/RepoTesting/Directory.Packages.Helix.props index ec7e71ed142..cea240f0eed 100644 --- a/tests/Shared/RepoTesting/Directory.Packages.Helix.props +++ b/tests/Shared/RepoTesting/Directory.Packages.Helix.props @@ -64,7 +64,7 @@ - + @@ -73,7 +73,7 @@ - + From f38ec9decc51f184d9461af978fa796fd48dae64 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Oct 2025 20:22:23 +0000 Subject: [PATCH 3/7] Fix test projects and health check API usage for MongoDB and RabbitMQ Co-authored-by: eerhardt <8291187+eerhardt@users.noreply.github.com> --- .../Aspire.MongoDB.Driver/AspireMongoDBDriverExtensions.cs | 7 +++++++ .../Aspire.MongoDB.Driver.Tests.csproj | 6 +++--- .../Aspire.MongoDB.Driver.v2.Tests.csproj | 4 ++++ .../Aspire.RabbitMQ.Client.Tests.csproj | 5 ++--- .../Aspire.RabbitMQ.Client.v6.Tests.csproj | 4 ++++ 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/Components/Aspire.MongoDB.Driver/AspireMongoDBDriverExtensions.cs b/src/Components/Aspire.MongoDB.Driver/AspireMongoDBDriverExtensions.cs index f6766a25660..46169ce63d4 100644 --- a/src/Components/Aspire.MongoDB.Driver/AspireMongoDBDriverExtensions.cs +++ b/src/Components/Aspire.MongoDB.Driver/AspireMongoDBDriverExtensions.cs @@ -170,7 +170,14 @@ private static void AddHealthCheck( builder.TryAddHealthCheck( healthCheckName, healthCheck => healthCheck.AddMongoDb( +#if MONGODB_V2 settings.ConnectionString, +#else + serviceKey is null + ? sp => sp.GetRequiredService() + : sp => sp.GetRequiredKeyedService(serviceKey), + _ => MongoUrl.Create(settings.ConnectionString).DatabaseName, +#endif healthCheckName, null, null, diff --git a/tests/Aspire.MongoDB.Driver.Tests/Aspire.MongoDB.Driver.Tests.csproj b/tests/Aspire.MongoDB.Driver.Tests/Aspire.MongoDB.Driver.Tests.csproj index a622af8c042..e38366a8ea9 100644 --- a/tests/Aspire.MongoDB.Driver.Tests/Aspire.MongoDB.Driver.Tests.csproj +++ b/tests/Aspire.MongoDB.Driver.Tests/Aspire.MongoDB.Driver.Tests.csproj @@ -10,9 +10,9 @@ - - - + + + diff --git a/tests/Aspire.MongoDB.Driver.v2.Tests/Aspire.MongoDB.Driver.v2.Tests.csproj b/tests/Aspire.MongoDB.Driver.v2.Tests/Aspire.MongoDB.Driver.v2.Tests.csproj index e7d803012e7..ccdf3bf8437 100644 --- a/tests/Aspire.MongoDB.Driver.v2.Tests/Aspire.MongoDB.Driver.v2.Tests.csproj +++ b/tests/Aspire.MongoDB.Driver.v2.Tests/Aspire.MongoDB.Driver.v2.Tests.csproj @@ -14,6 +14,10 @@ + + + + diff --git a/tests/Aspire.RabbitMQ.Client.Tests/Aspire.RabbitMQ.Client.Tests.csproj b/tests/Aspire.RabbitMQ.Client.Tests/Aspire.RabbitMQ.Client.Tests.csproj index 526fc3ea68b..8862b861b5a 100644 --- a/tests/Aspire.RabbitMQ.Client.Tests/Aspire.RabbitMQ.Client.Tests.csproj +++ b/tests/Aspire.RabbitMQ.Client.Tests/Aspire.RabbitMQ.Client.Tests.csproj @@ -2,7 +2,6 @@ $(AllTargetFrameworks) - $(DefineConstants);RABBITMQ_V6 @@ -10,8 +9,8 @@ - - + + diff --git a/tests/Aspire.RabbitMQ.Client.v6.Tests/Aspire.RabbitMQ.Client.v6.Tests.csproj b/tests/Aspire.RabbitMQ.Client.v6.Tests/Aspire.RabbitMQ.Client.v6.Tests.csproj index 3907237fc34..f6d85623ea6 100644 --- a/tests/Aspire.RabbitMQ.Client.v6.Tests/Aspire.RabbitMQ.Client.v6.Tests.csproj +++ b/tests/Aspire.RabbitMQ.Client.v6.Tests/Aspire.RabbitMQ.Client.v6.Tests.csproj @@ -2,6 +2,7 @@ $(AllTargetFrameworks) + $(DefineConstants);RABBITMQ_V6 @@ -14,6 +15,9 @@ + + + From 49f70e178d5763d92e95b4fe57915f9bf44f1264 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Oct 2025 14:21:10 +0000 Subject: [PATCH 4/7] Revert README.md changes to preserve original versioning strategy example Co-authored-by: eerhardt <8291187+eerhardt@users.noreply.github.com> --- src/Components/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Components/README.md b/src/Components/README.md index 215260b71b1..f1d1e2369f1 100644 --- a/src/Components/README.md +++ b/src/Components/README.md @@ -42,12 +42,12 @@ In the situation that a client library associated with an Aspire client integrat To understand how this will work, an example of this is the `RabbitMQ.Client` library made many large breaking changes between version `6.8.1` and `7.0.0`. To handle this: -1. For .NET Aspire 8.x, the `Aspire.RabbitMQ.Client` package had a NuGet version limit on the dependency: `[6.8.1,7.0.0)` to support v6 of RabbitMQ.Client. -2. During the .NET Aspire `8.x` and `9.x` lifetime, `Aspire.RabbitMQ.Client.v7` was available for users who wanted to opt into using v7 of RabbitMQ.Client. -3. Starting with .NET Aspire 13, the dependencies have been "swapped": - - The `Aspire.RabbitMQ.Client` package now depends on v7 of `RabbitMQ.Client` (version 7.1.2). - - For users who need to continue using v6, `Aspire.RabbitMQ.Client.v6` is available with the dependency limit `[6.8.1, 7.0.0)`. - - `Aspire.RabbitMQ.Client.v7` has been dead-ended. There are no new .NET Aspire 13 versions of this package. +1. For the current `Aspire.RabbitMQ.Client` package, we 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. When `RabbitMQ.Client` ships an official `7.0.0` stable package during the .NET Aspire `8.x` lifetime, we can add a new, forked client integration named `Aspire.RabbitMQ.Client.v7` which will have a dependency on `7.0.0` and contain any updates so the .NET Aspire client integration will work with v7. People who explicitly want to use v7 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 v7 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. ## Icon From e322c8e5e0d80af443c3e6248ea7f3879c63c1b3 Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Wed, 22 Oct 2025 09:33:37 -0500 Subject: [PATCH 5/7] Tweak RabbitMQ projects --- eng/clipack/Common.projitems | 2 +- .../Aspire.RabbitMQ.Client.v6/Aspire.RabbitMQ.Client.v6.csproj | 2 +- .../Aspire.RabbitMQ.Client/Aspire.RabbitMQ.Client.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/clipack/Common.projitems b/eng/clipack/Common.projitems index 96c9f9a1852..ab3c17127aa 100644 --- a/eng/clipack/Common.projitems +++ b/eng/clipack/Common.projitems @@ -92,7 +92,7 @@ <_MaxFileSizeMB Condition="'$(_MaxFileSizeMB)' == '' and !$([System.OperatingSystem]::IsWindows())">25 - <_GetFileSizeMBCommand Condition="$([System.OperatingSystem]::IsWindows())">pwsh -Command "[Math]::Ceiling((Get-Item '$(_NativeBinaryPath)' -ErrorAction Stop).Length / 1MB)" + <_GetFileSizeMBCommand Condition="$([System.OperatingSystem]::IsWindows())">pwsh -NoProfile -Command "[Math]::Ceiling((Get-Item '$(_NativeBinaryPath)' -ErrorAction Stop).Length / 1MB)" <_GetFileSizeMBCommand Condition="!$([System.OperatingSystem]::IsWindows())">du -m '$(_NativeBinaryPath)' | cut -f1 diff --git a/src/Components/Aspire.RabbitMQ.Client.v6/Aspire.RabbitMQ.Client.v6.csproj b/src/Components/Aspire.RabbitMQ.Client.v6/Aspire.RabbitMQ.Client.v6.csproj index 58fa9ce2800..3ac1ec9ab8b 100644 --- a/src/Components/Aspire.RabbitMQ.Client.v6/Aspire.RabbitMQ.Client.v6.csproj +++ b/src/Components/Aspire.RabbitMQ.Client.v6/Aspire.RabbitMQ.Client.v6.csproj @@ -4,7 +4,7 @@ $(AllTargetFrameworks) true $(ComponentDatabasePackageTags) rabbitmq amqp - A RabbitMQ client (version 6+) that integrates with Aspire, including health checks, logging, and telemetry. + A RabbitMQ client (version 6) that integrates with Aspire, including health checks, logging, and telemetry. $(NoWarn);SYSLIB1100;SYSLIB1101 $(DefineConstants);RABBITMQ_V6 diff --git a/src/Components/Aspire.RabbitMQ.Client/Aspire.RabbitMQ.Client.csproj b/src/Components/Aspire.RabbitMQ.Client/Aspire.RabbitMQ.Client.csproj index f0596936203..e81a7eee0eb 100644 --- a/src/Components/Aspire.RabbitMQ.Client/Aspire.RabbitMQ.Client.csproj +++ b/src/Components/Aspire.RabbitMQ.Client/Aspire.RabbitMQ.Client.csproj @@ -19,7 +19,7 @@ - + From b852662a38772910db57acf7aba69453921c6c5e Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Wed, 22 Oct 2025 09:39:03 -0500 Subject: [PATCH 6/7] Tweak package descriptions --- .../Aspire.MongoDB.Driver.v2/Aspire.MongoDB.Driver.v2.csproj | 2 +- .../Aspire.RabbitMQ.Client.v6/Aspire.RabbitMQ.Client.v6.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Components/Aspire.MongoDB.Driver.v2/Aspire.MongoDB.Driver.v2.csproj b/src/Components/Aspire.MongoDB.Driver.v2/Aspire.MongoDB.Driver.v2.csproj index b14ee4746af..5a0be3166fb 100644 --- a/src/Components/Aspire.MongoDB.Driver.v2/Aspire.MongoDB.Driver.v2.csproj +++ b/src/Components/Aspire.MongoDB.Driver.v2/Aspire.MongoDB.Driver.v2.csproj @@ -5,7 +5,7 @@ true $(ComponentDatabasePackageTags) MongoDB $(SharedDir)MongoDB_300px.png - A generic MongoDB client (version 2+) that integrates with Aspire. + A generic MongoDB client (versions 2.x) that integrates with Aspire. $(NoWarn);CS8002 $(DefineConstants);MONGODB_V2 diff --git a/src/Components/Aspire.RabbitMQ.Client.v6/Aspire.RabbitMQ.Client.v6.csproj b/src/Components/Aspire.RabbitMQ.Client.v6/Aspire.RabbitMQ.Client.v6.csproj index 3ac1ec9ab8b..3aed2918ad9 100644 --- a/src/Components/Aspire.RabbitMQ.Client.v6/Aspire.RabbitMQ.Client.v6.csproj +++ b/src/Components/Aspire.RabbitMQ.Client.v6/Aspire.RabbitMQ.Client.v6.csproj @@ -4,7 +4,7 @@ $(AllTargetFrameworks) true $(ComponentDatabasePackageTags) rabbitmq amqp - A RabbitMQ client (version 6) that integrates with Aspire, including health checks, logging, and telemetry. + A RabbitMQ client (versions 6.x) that integrates with Aspire, including health checks, logging, and telemetry. $(NoWarn);SYSLIB1100;SYSLIB1101 $(DefineConstants);RABBITMQ_V6 From 68b44c47a166d732d0402e4e70e1a623c92e54e5 Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Wed, 22 Oct 2025 09:59:09 -0500 Subject: [PATCH 7/7] Fix ConfigurationSchema generation for RabbitMQ v6 --- .../Aspire.RabbitMQ.Client.v6.csproj | 1 + .../ConfigurationSchema.json | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/Components/Aspire.RabbitMQ.Client.v6/Aspire.RabbitMQ.Client.v6.csproj b/src/Components/Aspire.RabbitMQ.Client.v6/Aspire.RabbitMQ.Client.v6.csproj index f079ad6379a..a1bd7ca3f82 100644 --- a/src/Components/Aspire.RabbitMQ.Client.v6/Aspire.RabbitMQ.Client.v6.csproj +++ b/src/Components/Aspire.RabbitMQ.Client.v6/Aspire.RabbitMQ.Client.v6.csproj @@ -18,6 +18,7 @@ + diff --git a/src/Components/Aspire.RabbitMQ.Client.v6/ConfigurationSchema.json b/src/Components/Aspire.RabbitMQ.Client.v6/ConfigurationSchema.json index ee6249d78ae..ed0c4a41049 100644 --- a/src/Components/Aspire.RabbitMQ.Client.v6/ConfigurationSchema.json +++ b/src/Components/Aspire.RabbitMQ.Client.v6/ConfigurationSchema.json @@ -45,12 +45,12 @@ }, "ConsumerDispatchConcurrency": { "type": "integer", - "description": "Set to a value greater than one to enable concurrent processing. For a concurrency greater than one 'RabbitMQ.Client.IAsyncBasicConsumer' will be offloaded to the worker thread pool so it is important to choose the value for the concurrency wisely to avoid thread pool overloading. 'RabbitMQ.Client.IAsyncBasicConsumer' can handle concurrency much more efficiently due to the non-blocking nature of the consumer. Defaults to 1." + "description": "Set to a value greater than one to enable concurrent processing. For a concurrency greater than one 'RabbitMQ.Client.IBasicConsumer' will be offloaded to the worker thread pool so it is important to choose the value for the concurrency wisely to avoid thread pool overloading. 'RabbitMQ.Client.IAsyncBasicConsumer' can handle concurrency much more efficiently due to the non-blocking nature of the consumer. Defaults to 1." }, "ContinuationTimeout": { "type": "string", "pattern": "^-?(\\d{1,7}|((\\d{1,7}[\\.:])?(([01]?\\d|2[0-3]):[0-5]?\\d|([01]?\\d|2[0-3]):[0-5]?\\d:[0-5]?\\d)(\\.\\d{1,7})?))$", - "description": "Amount of time protocol operations (e.g. queue.declare) are allowed to take before timing out." + "description": "Amount of time protocol operations (e.g. queue.declare) are allowed to take before timing out." }, "DefaultAddressFamily": { "enum": [ @@ -103,6 +103,10 @@ ], "description": "TLS versions enabled by default: TLSv1.2, v1.1, v1.0." }, + "DispatchConsumersAsync": { + "type": "boolean", + "description": "Set to true will enable a asynchronous consumer dispatcher which is compatible with 'RabbitMQ.Client.IAsyncBasicConsumer'. Defaults to false." + }, "Endpoint": { "type": "object", "properties": { @@ -212,9 +216,9 @@ "type": "string", "description": "The host to connect to." }, - "MaxInboundMessageBodySize": { + "MaxMessageSize": { "type": "integer", - "description": "Maximum allowed message size, in bytes, from RabbitMQ. Corresponds to the ConnectionFactory.DefaultMaxMessageSize setting." + "description": "Maximum allowed message size, in bytes, from RabbitMQ. Corresponds to the rabbit.max_message_size setting." }, "NetworkRecoveryInterval": { "type": "string", @@ -329,6 +333,11 @@ "type": "string", "description": "Gets or sets the connection string of the RabbitMQ server to connect to." }, + "DisableAutoActivation": { + "type": "boolean", + "description": "Gets or sets a boolean value that indicates whether auto activation is disabled or not.", + "default": true + }, "DisableHealthChecks": { "type": "boolean", "description": "Gets or sets a boolean value that indicates whether the RabbitMQ health check is disabled or not.",