From d3f9a643c8b34482453653a18e7624a1b50b1d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?SAL=C4=B0H=20=C3=96ZKARA?= Date: Tue, 10 Mar 2026 16:38:51 +0300 Subject: [PATCH] Update index.md --- .../framework/infrastructure/background-jobs/index.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/en/framework/infrastructure/background-jobs/index.md b/docs/en/framework/infrastructure/background-jobs/index.md index 61a4171b49..f581985df9 100644 --- a/docs/en/framework/infrastructure/background-jobs/index.md +++ b/docs/en/framework/infrastructure/background-jobs/index.md @@ -197,13 +197,15 @@ Enqueue method gets some optional arguments to control the background job: * **priority** is used to control priority of the job item. It gets an `BackgroundJobPriority` enum which has `Low`, `BelowNormal`, `Normal` (default), `AboveNormal` and `Hight` fields. * **delay** is used to wait a while (`TimeSpan`) before first try. -### Queue by Job Name +### Enqueue by ABP Job Name -You can also enqueue jobs by their name at runtime: +You can also enqueue jobs by their ABP background job name at runtime: ```csharp +var jobName = BackgroundJobNameAttribute.GetName(); // "emails" if configured via [BackgroundJobName] + await _backgroundJobManager.EnqueueAsync( - "emails", + jobName, new { EmailAddress = "user@abp.io", @@ -213,6 +215,8 @@ await _backgroundJobManager.EnqueueAsync( ); ``` +`jobName` here is the ABP background job name (configuration key), not a provider queue name (like a Hangfire queue or RabbitMQ queue). + In this case, ABP resolves the target job configuration by `jobName` and serializes the `args` object. If the `args` runtime type does not match the configured argument type, ABP normalizes the payload by serializing and deserializing it to the expected argument type.