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
parent
commit
bedaff10d6
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 8
      docs/en/framework/infrastructure/background-jobs/index.md
  2. 8
      docs/en/framework/infrastructure/background-workers/index.md

8
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<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;
});
}
````

8
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<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;
});
}
````

Loading…
Cancel
Save