You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/gitbook/guide/workers/concurrency.md
+22-2
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,29 @@
2
2
3
3
There are basically two ways to achieve concurrency with BullMQ. You can run a worker with a concurrency factor larger than 1 \(which is the default value\), or you can run several workers in different node processes.
4
4
5
-
#### Concurrency factor
5
+
#### Global Concurrency factor
6
6
7
-
The concurrency factor is a worker option that determines how many jobs are allowed to be processed in parallel. This means that the same worker is able to process several jobs in parallel, however the queue guarantees such as "at-least-once" and order of processing are still preserved.
7
+
The global concurrency factor is a queue option that determines how many jobs are allowed to be processed in parallel across all your worker instances.
Note that if you choose a concurrency level in your workers, it will not override the global one, it will just be the maximum jobs a given worker can process in parallel but never more than the global one.
23
+
{% endhint %}
24
+
25
+
#### Local Concurrency factor
26
+
27
+
The local concurrency factor is a worker option that determines how many jobs are allowed to be processed in parallel for that instance. This means that the same worker is able to process several jobs in parallel, however the queue guarantees such as "at-least-once" and order of processing are still preserved.
0 commit comments