samsondav / rihanna

Rihanna is a high performance postgres-backed job queue for Elixir
MIT License
439 stars 47 forks source link

Question: Projection on when multi-queue support will be a thing? #83

Open topherhunt opened 5 years ago

topherhunt commented 5 years ago

Hi there! I'm considering using Rihanna but it's not the best fit for my use case until it supports defining multiple queues, each with a configurable # of workers. I understand from your FAQ that this is a planned feature. Do you have any guess when it will become a priority? eg. next month / next year / next 5 years?

Thanks - and awesome project!

lpil commented 5 years ago

You can have this today by creating multiple instances of the Rihanna supervision tree, specifying different queue names for each one. :)

topherhunt commented 5 years ago

Oh! Thanks for pointing that out. Shows how much OTP basics I still have to learn. I'll give that a try.

samsondav commented 5 years ago

@topherhunt Closing this.

@lpil thanks for jumping in!

florinpatrascu commented 4 years ago

You can have this today by creating multiple instances of the Rihanna supervision tree, specifying different queue names for each one. :)

@lpil, care to elaborate, please? Are you implying that we can start an arbitrary number of Rhianna.Supervisor processes, and we can specify a different job table name per process (provided the new tables have been created already, of course)? The job table name is only available via the Application env, if I am not wrong?! Is there a "queue name" parameter I am not seeing?

Thank you.

lpil commented 4 years ago

I've not looked in a while but I believe this config is also accepted as an argument to the supervisor process.

florinpatrascu commented 4 years ago

I am afraid it is not :( The only parameters I see available to us, that can be configures in the supervision tree (except the name) are the :postgrex and the :startup_delay, if I am not wrong.

lpil commented 4 years ago

Apologies, I was thinking of the job dispatcher, and even then it doesn't support injecting this argument. We'd accept a pull request for this feature.

florinpatrascu commented 4 years ago

@lpil - no need to apologize, I was just hoping I'm wrong ;) Will try to get a stab at this, unless there are similar initiatives pending already?! Thank you, for confirming my findings.