My use case:
My application will have any number of Users, and each of those Users will have various Jobs they want to process. These jobs should be able to happen concurrently -- some of them, anyway.
So, for example, if User1 sends through a command like UpdateStock and CompleteSale, and User2 sends through a command like UpdateStock, each of those commands needs to be queued up and allowed to run concurrently with each other.
I've been looking into Laravel Queues and it looks like, if I were to put all 3 jobs into one queue, they would only run one at a time, but if I put them into 3 different queues, they'd all be able to run concurrently. Do I understand that right?
So that brings me to my next issue then: I'll need one queue, per user, per command. But of course new users are signing up all the time, and if I need to run php artisan queue:listen --queue=user1:command1 & php artisan queue:listen --queue=user1:command2 & php artisan queue:listen --queue=user2:command1 ... to get this to work then... how is that even possible? When a new user could be added any minute...
I mean I could write some php that executes php artisan queue:listen --queue=userx:commandx programmatically after every time I add something to the queue, but I'm not sure that makes sense. What if that command has already run -- will it have 2 processes trying to process the same queue?
Perhaps I'm thinking about it the wrong way though. I'm feeling kinda lost about the whole thing. I could use some advice.