coravel icon indicating copy to clipboard operation
coravel copied to clipboard

Unique name queues

Open farhadnowzari opened this issue 2 years ago • 4 comments

The issue related to this PR is. https://github.com/jamesmh/coravel/issues/284

A new extension method is added to the ServicesCollection, AddQueues. This method will get an action which has the IServicesCollection as the parameter so you can use AddQueue as you would do normally. Also it will inject IQueues into DI so you can query for the registered queues.

The ToDos in my opinion are as follow:

  1. On AddQueues method it should NOT be possible that inside the action we can again call AddQueues . Maybe we can replace the IServicesCollection with QueuesOption and this class will provide the AddQueue method.
  2. At the moment in Coravel it is configurable that how often the worker run the single queue but since we have now multiple queues I think this should also have a configuration in appsettings.json. If they specify the old config it would be apply for all but if they specify the name of the queue as the key and the value will be the delay inside appsettings we can adjust each queue.
  3. The queue name at the moment is not really unique. On adding them to the DI we should check if the same name is already added or not and handle the error accordingly.

farhadnowzari avatar May 21 '22 16:05 farhadnowzari

Hi @jamesmh

Let me know if anything is needed regarding thie PR

farhadnowzari avatar Feb 08 '23 12:02 farhadnowzari

Any news on this? This would be very useful.

skobbejakkals avatar Oct 18 '23 14:10 skobbejakkals

Any update on this?

jaisonass avatar Feb 21 '24 14:02 jaisonass

This would be so useful if it got merged.

bCamba avatar Feb 25 '24 16:02 bCamba