Skip to content

Commit a09a3c3

Browse files
Merge pull request #2674 from berenar/add-warning-about-multiple-consumers
docs(queues): add concurrency warning when defining multiple consumers
2 parents d20482d + b23522d commit a09a3c3

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)