Skip to content

Commit 3703e8e

Browse files
committed
docs(queues): add concurrency warning when defining multiple consumers
1 parent d20482d commit 3703e8e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

content/techniques/queues.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ You can designate that a job handler method will handle **only** jobs of a certa
241241
async transcode(job: Job<unknown>) { ... }
242242
```
243243

244+
> Warning **Warning** When defining multiple consumers for the same queue, the `concurrency` option in `@Process({ concurrency: 1 })` won't take effect. The minimum `concurrency` will match the number of consumers defined. This also applies even if `@Process()` handlers use a different `name` to handle named jobs.
245+
244246
#### Request-scoped consumers
245247

246248
When a consumer is flagged as request-scoped (learn more about the injection scopes [here](/fundamentals/injection-scopes#provider-scope)), a new instance of the class will be created exclusively for each job. The instance will be garbage-collected after the job has completed.

0 commit comments

Comments
 (0)