hibiken / asynq

Simple, reliable, and efficient distributed task queue in Go
MIT License
9k stars 659 forks source link

Order of task execution #871

Open dikdom opened 2 months ago

dikdom commented 2 months ago

Hello, is there any guarantee of the task execution order depending on the enqueue order? I know this sounds silly as this is a queue but unfortunately I have some contradicting experience. Shall I continue investigating my setup or there is no guarantee of the order of the task executions? Thanks!

kamikazechaser commented 2 months ago

Well there are ways to achieve something similar. Forcing lower concurrency, checking previous task status in task handlers. But there are no guarantees in any case.

dikdom commented 2 months ago

That is sad, I mean this is meant to be a queue. In theory when there is only one process that executes the tasks, then the order of the executions should be the same order as they were inserted in the queue. Am I missing here something?