Browse Source
Merge pull request #23978 from abpframework/rabbitmq-job-worker-document
Update RabbitMQ job options configuration in docs
pull/23985/head
Engincan VESKE
6 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
8 additions and
8 deletions
-
docs/en/framework/infrastructure/background-jobs/index.md
-
docs/en/framework/infrastructure/background-workers/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<AbpRabbitMqBackgroundJobOptions>(options => |
|
|
|
Configure<AbpRabbitMqBackgroundJobOptions>(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; |
|
|
|
}); |
|
|
|
} |
|
|
|
```` |
|
|
|
|
|
|
|
@ -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<AbpRabbitMqBackgroundJobOptions>(options => |
|
|
|
Configure<AbpRabbitMqBackgroundJobOptions>(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; |
|
|
|
}); |
|
|
|
} |
|
|
|
```` |
|
|
|
|