diff --git a/pkg/dbal/DbalConsumer.php b/pkg/dbal/DbalConsumer.php index 69b11dbb0..796b27a55 100644 --- a/pkg/dbal/DbalConsumer.php +++ b/pkg/dbal/DbalConsumer.php @@ -213,6 +213,7 @@ private function fetchPrioritizedMessage($now) ->andWhere('priority IS NOT NULL') ->andWhere('(delayed_until IS NULL OR delayed_until <= :delayedUntil)') ->addOrderBy('priority', 'desc') + ->addOrderBy('published_at', 'asc') ->setMaxResults(1) ;