maragudk / goqite

Go queue library built on SQLite and inspired by AWS SQS.
https://maragudk.github.io/goqite/
MIT License
435 stars 13 forks source link

Concurrency limit #59

Open michaelangeloio opened 6 days ago

michaelangeloio commented 6 days ago

Is it possible to set a concurrency limit for a specific queue? Like limit concurrency per user ID?

markuswustenberg commented 5 days ago

@michaelangeloio the queue isn't really concerned with how you consume it, that's on the consumer side.

If you mean within the jobs package, you can set a global concurrent job limit: https://pkg.go.dev/github.com/maragudk/goqite@v0.2.3/jobs#NewRunnerOpts . But it wouldn't be able to do it based on something like user ID, because there's no concept of user ID in the queue itself.