Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jobs on RabbitMQ queues are limited to only one executing job at a time per queue for each server #2

Open
mthierba opened this issue Nov 14, 2016 · 1 comment

Comments

@mthierba
Copy link
Contributor

Queue consumers - one of which is created for each Hangfire queue - are configured with a prefetchCount setting of '1':

The result of that is that each consumer will only be allowed to have one message (job) unacked - which they are whilst being processed. Even if more workers are configured and available on a given server, they are all made to wait for one job to be completed until another one can be started.

@mthierba mthierba mentioned this issue Nov 14, 2016
@mthierba
Copy link
Contributor Author

It should be noted that #3 does not change the behavior described above automatically as current consumers of the library might explicitly or implicitly depend on it, and it would be a breaking change requiring a major version bump.

What it does it to introduce an extra configuration setting PrefetchCount which users are highly encouraged to leverage, however:

sqlServerStorage.UseRabbitMq(rabbit =>
{
    rabbit.HostName = "localhost";
    rabbit.PrefetchCount = 10;
}, "default", "critical");

^ This allows up to 10 jobs to be executed in parallel for each queue and server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant