Process Jobs In Order By Key #54548
Unanswered
ProgrammerZ
asked this question in
Q&A
Replies: 1 comment 5 replies
-
You must use FIFO queue. SQS FIFO queue for example. No code change needed. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to find a way to preserve the execution order of jobs exactly as they were dispatched by arbitrary key.
For example when we sync data with external API we need to process all the jobs for a particular resource in sequence to avoid errors. If the Job is delayed – we need to halt any other jobs to that resource until the first one is processed. Then second in order and so on until all will be resolved by some key.
I can’t use Chained Jobs or Batched (at least to my knowledge) since these jobs are dispatched in no particular order.
I'm looking for ways to accomplish this using Laravel's existing job queue system without adding unnecessary complexity.
Beta Was this translation helpful? Give feedback.
All reactions