From e1e0b8ad8d8898a6bd0dcdd421a40434a5b567d7 Mon Sep 17 00:00:00 2001 From: maliming Date: Fri, 17 Oct 2025 09:49:56 +0800 Subject: [PATCH] Update RabbitMQ job options configuration in docs Fix #23977 --- docs/en/framework/infrastructure/background-jobs/index.md | 8 ++++---- .../framework/infrastructure/background-workers/index.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/en/framework/infrastructure/background-jobs/index.md b/docs/en/framework/infrastructure/background-jobs/index.md index cbc4d04c61..286b09d569 100644 --- a/docs/en/framework/infrastructure/background-jobs/index.md +++ b/docs/en/framework/infrastructure/background-jobs/index.md @@ -325,12 +325,12 @@ public override void PreConfigureServices(ServiceConfigurationContext context) Set `DefaultQueueNamePrefix` and `DefaultDelayedQueueNamePrefix` properties in `AbpRabbitMqBackgroundJobOptions` to your application's name: ````csharp -public override void PreConfigureServices(ServiceConfigurationContext context) +public override void ConfigureServices(ServiceConfigurationContext context) { - PreConfigure(options => + Configure(options => { - options.DefaultQueueNamePrefix = context.Services.GetApplicationName()!.EndsWith('.') + options.DefaultQueueNamePrefix; - options.DefaultDelayedQueueNamePrefix = context.Services.GetApplicationName()!.EndsWith('.') + options.DefaultDelayedQueueNamePrefix; + options.DefaultQueueNamePrefix = context.Services.GetApplicationName()!.EnsureEndsWith('.') + options.DefaultQueueNamePrefix; + options.DefaultDelayedQueueNamePrefix = context.Services.GetApplicationName()!.EnsureEndsWith('.') + options.DefaultDelayedQueueNamePrefix; }); } ```` diff --git a/docs/en/framework/infrastructure/background-workers/index.md b/docs/en/framework/infrastructure/background-workers/index.md index 8e179bc916..f6fe5fbb70 100644 --- a/docs/en/framework/infrastructure/background-workers/index.md +++ b/docs/en/framework/infrastructure/background-workers/index.md @@ -206,12 +206,12 @@ public override void PreConfigureServices(ServiceConfigurationContext context) Set `DefaultQueueNamePrefix` and `DefaultDelayedQueueNamePrefix` properties in `AbpRabbitMqBackgroundJobOptions` to your application's name: ````csharp -public override void PreConfigureServices(ServiceConfigurationContext context) +public override void ConfigureServices(ServiceConfigurationContext context) { - PreConfigure(options => + Configure(options => { - options.DefaultQueueNamePrefix = context.Services.GetApplicationName()!.EndsWith('.') + options.DefaultQueueNamePrefix; - options.DefaultDelayedQueueNamePrefix = context.Services.GetApplicationName()!.EndsWith('.') + options.DefaultDelayedQueueNamePrefix; + options.DefaultQueueNamePrefix = context.Services.GetApplicationName()!.EnsureEndsWith('.') + options.DefaultQueueNamePrefix; + options.DefaultDelayedQueueNamePrefix = context.Services.GetApplicationName()!.EnsureEndsWith('.') + options.DefaultDelayedQueueNamePrefix; }); } ````