coravel
coravel copied to clipboard
Unique name queues
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:
- On
AddQueues
method it should NOT be possible that inside the action we can again callAddQueues
. Maybe we can replace the IServicesCollection withQueuesOption
and this class will provide theAddQueue
method. - 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 thequeue
as the key and the value will be the delay insideappsettings
we can adjust each queue. - 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.
Hi @jamesmh
Let me know if anything is needed regarding thie PR
Any news on this? This would be very useful.
Any update on this?
This would be so useful if it got merged.