Laravel 13.26 introduces Queue::forward() to reroute queued jobs to new queue names, different connections, or both without modifying job classes or dispatch sites.
Rerouting background job traffic (such as moving high-throughput workloads from a shared Redis worker pool to dedicated Amazon SQS FIFO queues) traditionally required updating every job class property and manual dispatch call (->onQueue(...), ->onConnection(...)).
Laravel 13.26 adds Queue::forward(), allowing you to centrally intercept and redirect queue traffic at the application boot layer.
Centralized Configuration
Register forwarding rules centrally in your AppServiceProvider::boot() method:
namespace App\Providers;
use Illuminate\Support\Facades\Queue;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
public function boot(): void
{
// 1. Reroute both queue name and connection (e.g. migrating to SQS FIFO)
Queue::forward('reports', 'reports.fifo', connection: 'sqs-fifo');
// 2. Shift connection driver while retaining the original queue name
Queue::forward('payments', connection: 'stripe-workers');
// 3. Rename a queue channel on the default connection
Queue::forward('legacy-updates', 'notifications');
// 4. Batch forward multiple queues to another connection
Queue::forward([
'emails' => 'emails.fifo',
'webhooks' => 'webhooks.fifo',
], connection: 'sqs-fifo');
}
}
Dispatch Code Remains Unchanged
Application dispatch sites and job classes continue referencing their original queue names:
// Dispatch code remains completely untouched
GenerateMonthlyReport::dispatch($report)->onQueue('reports');
Laravel resolves forwarding through its internal queue routing pipeline, transparently redirecting the job to reports.fifo on the sqs-fifo connection.
Related Tips
View all tips →Monitor Aggregate Queue Metrics with Total Size Helpers in Laravel 13.27
Laravel 13.27 adds totalPendingSize(), totalDelayedSize(), and totalReservedSize() to the Queue facade, making it easy to aggregate queue metrics for dashboards and health checks.
Debounce Queued Event Listeners with #[DebounceFor] in Laravel 13.26
Laravel 13.26 extends the #[DebounceFor] attribute to queued event listeners, collapsing bursts of repeated events into a single execution based on the latest resource state.