What exactly you're trying to achieve?
Oct 15, 2025
8
Level 1
Laravel Queue how to force retry?
I wasn't able to clearly find this in the docs so i had to manually experiment, this is how it behaves:
// ignores tries, backoff, and maxExceptions
$this->fail(new Exception('test'));
// respects tries, backoff, and maxExceptions
throw new Exception('test');
// respects tries and ignores backoff, maxExceptions
$this->release();
The use case that I needed but wasn't trivial is this, set
$backoff = [5, 10, 20]
$tries = 10
$maxExceptions = 2
In handler code I want to force retry but I cannot do it because release will override backoff and throwing will be limited to maxException = 2. Am I missing something?
Please or to participate in this conversation.