From a659e834fe91d10e80df1a6414b4b0d4ad5b9fe3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 04:22:24 +0000 Subject: [PATCH 1/2] Initial plan From 500144cce7299d52bbcfad015adebef321e0d4dc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 04:30:21 +0000 Subject: [PATCH 2/2] Add RabbitMQ auto activation documentation Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com> --- .../docs/integrations/messaging/rabbitmq.mdx | 28 +++++++++++++++++++ .../src/content/docs/whats-new/aspire-9-5.mdx | 18 ++++++++++-- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/content/docs/integrations/messaging/rabbitmq.mdx b/src/frontend/src/content/docs/integrations/messaging/rabbitmq.mdx index 52a220f6..5a789842 100644 --- a/src/frontend/src/content/docs/integrations/messaging/rabbitmq.mdx +++ b/src/frontend/src/content/docs/integrations/messaging/rabbitmq.mdx @@ -289,6 +289,34 @@ builder.AddRabbitMQClient( static factory => factory.ClientProvidedName = "MyApp"); ``` +### Auto activation + +Auto activation is a feature that helps prevent startup deadlocks in applications that use RabbitMQ. When auto activation is enabled, the RabbitMQ client connection is automatically opened when the application starts, rather than being lazily initialized on first use. This ensures that any connection issues are detected early during application startup, rather than during runtime operations. + +#### When to enable auto activation + +Auto activation is particularly useful in scenarios where: + +- Your application needs to verify RabbitMQ connectivity during startup +- You want to fail fast if RabbitMQ is unavailable +- Your application architecture requires connections to be established before accepting traffic +- You're experiencing startup deadlocks or race conditions with lazy connection initialization + +#### Configuration + +Auto activation is **disabled by default** in Aspire 9.5 to maintain backward compatibility. To enable auto activation, set the `DisableAutoActivation` property to `false` in the `RabbitMQClientSettings`: + +```csharp title="C# — Program.cs" +var builder = WebApplication.CreateBuilder(args); + +// Enable auto activation +builder.AddRabbitMQClient("messaging", o => o.DisableAutoActivation = false); +``` + + + ### Client integration health checks By default, Aspire integrations enable health checks for all services. The Aspire RabbitMQ integration: diff --git a/src/frontend/src/content/docs/whats-new/aspire-9-5.mdx b/src/frontend/src/content/docs/whats-new/aspire-9-5.mdx index 1934cec7..beec3b72 100644 --- a/src/frontend/src/content/docs/whats-new/aspire-9-5.mdx +++ b/src/frontend/src/content/docs/whats-new/aspire-9-5.mdx @@ -456,15 +456,29 @@ builder.Build().Run(); ### RabbitMQ auto activation -RabbitMQ client connections now support auto activation to prevent startup deadlocks and improve application reliability. Auto activation is disabled by default in 9.5, but planned to be enabled by default in a future release. +RabbitMQ client connections now support auto activation to prevent startup deadlocks and improve application reliability. When enabled, auto activation ensures that the RabbitMQ connection is established during application startup rather than being lazily initialized on first use. This helps detect connection issues early and prevents certain race conditions that can occur with lazy initialization. + +Auto activation is **disabled by default** in Aspire 9.5 to maintain backward compatibility. In a future release, it's planned to be **enabled by default**. + +**When to enable auto activation:** + +- Your application needs to verify RabbitMQ connectivity during startup +- You want to fail fast if RabbitMQ is unavailable +- Your application requires connections to be established before accepting traffic +- You're experiencing startup deadlocks with lazy connection initialization + +**Enable auto activation:** ```csharp var builder = WebApplication.CreateBuilder(args); -// Auto activation is disabled by default for RabbitMQ, enable using DisableAutoActivation=false +// Auto activation is disabled by default for RabbitMQ +// Enable using DisableAutoActivation=false builder.AddRabbitMQClient("messaging", o => o.DisableAutoActivation = false); ``` +For more information, see [RabbitMQ integration - Auto activation](/integrations/messaging/rabbitmq/#auto-activation). + ### Redis integration improvements #### Auto activation