Queue::forward(): Reroute Laravel Queues in One Place | Mohamed Said        [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://www.msaied.com) [ Home ](https://www.msaied.com) [ Projects ](https://www.msaied.com/projects) [ Articles  ](https://www.msaied.com/articles) [ Certificates ](https://www.msaied.com/certificates) [ Contact ](https://www.msaied.com#contact-section) 

       [  ](https://github.com/EG-Mohamed)       

 [ Home ](https://www.msaied.com) [ Projects ](https://www.msaied.com/projects) [ Articles ](https://www.msaied.com/articles) [ Certificates ](https://www.msaied.com/certificates) [ Contact ](https://www.msaied.com#contact-section) 

  [ home ](https://www.msaied.com)    [ articles ](https://www.msaied.com/articles)    Queue::forward(): Reroute Laravel Queues in One Place        On this page       1. [  The Problem Queue::forward() Solves ](#the-problem-queueforward-solves)
2. [  The API ](#the-api)
3. [  Routing by Environment ](#routing-by-environment)
4. [  What Queue::forward() Does Not Do ](#what-queueforward-does-not-do)
5. [  Key Takeaways ](#key-takeaways)

  ![Queue::forward(): Reroute Laravel Queues in One Place](https://cdn.msaied.com/572/c3ded57b390d88d1ceb9bd8570729835.png)

 [  Laravel ](https://www.msaied.com/articles?category=laravel)  #Laravel   #Queues   #Laravel 13.26   #PHP   #Queue Routing  

 Queue::forward(): Reroute Laravel Queues in One Place 
=======================================================

     19 Aug 2026      3 min read    ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said  

       Table of contents

1. [  01   The Problem Queue::forward() Solves  ](#the-problem-queueforward-solves)
2. [  02   The API  ](#the-api)
3. [  03   Routing by Environment  ](#routing-by-environment)
4. [  04   What Queue::forward() Does Not Do  ](#what-queueforward-does-not-do)
5. [  05   Key Takeaways  ](#key-takeaways)

 The Problem Queue::forward() Solves
-----------------------------------

Queue names have a habit of spreading across your codebase. A job class sets `onQueue('reports')`, a dispatch call chains `->onConnection('redis')`, a `#[Queue]` attribute pins another, and your worker configuration matches all of it. When you need to move that queue to a new Redis instance or rename it to satisfy a managed FIFO service, every one of those locations needs updating — including third-party packages you don't control.

[Laravel 13.26](https://laravel-news.com/laravel-13-26-0) ships `Queue::forward()`, contributed by [@jackbayliss](https://github.com/jackbayliss) in [\#61188](https://github.com/laravel/framework/pull/61188). It lets you declare, in one place, that jobs dispatched to a given queue should land on a different queue, a different connection, or both.

The API
-------

All signatures take a source queue and a destination:

```php
use Illuminate\Support\Facades\Queue;

// Rename and move to another connection
Queue::forward('reports', 'reports.fifo', 'cloud');

// Keep the name, change the connection
Queue::forward('payments', connection: 'cloud');

// Rename on the same connection
Queue::forward('updates', 'notifications');

// Map several queues at once
Queue::forward([
    'reports' => 'reports.fifo',
    'emails'  => 'emails.fifo',
], connection: 'cloud');

```

Queue names can be strings or backed enums. Register calls in a service provider's `boot()` method. Forwarding resolves through the same `getConnection()` hook that `Queue::route()` uses, so no new contract is required for custom drivers.

**Important matching detail:** a forward that specifies a connection only rewrites the queue name for jobs headed to that connection. A job explicitly dispatched to `reports` on `redis` keeps its name even if a forward targets `reports` on `cloud`. Forwards are a mapping, not a global find-and-replace.

Routing by Environment
----------------------

Registering forwards in a provider makes environment-specific routing straightforward:

```php
namespace App\Providers;

use Illuminate\Support\Facades\Queue;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    public function boot(): void
    {
        if ($this->app->isProduction()) {
            Queue::forward([
                'reports' => 'reports.fifo',
                'emails'  => 'emails.fifo',
            ], connection: 'cloud');
        }
    }
}

```

Locally, `dispatch(new GenerateReport)` goes to `reports` on Redis as always. In production the identical code lands on `reports.fifo` on the managed connection. No environment checks inside job classes, no `config/queue.php` gymnastics.

The same pattern handles operational moves that previously required touching many files:

```php
// Offload a heavy queue to a dedicated Redis instance
Queue::forward('encoding', connection: 'redis-heavy');

// Trial a new connection with one low-stakes queue
Queue::forward('notifications', connection: 'sqs-experiment');

```

Because a forward is one line, rolling back means deleting it — making gradual connection rollouts practical.

What Queue::forward() Does Not Do
---------------------------------

- **It applies at dispatch time only.** Jobs already sitting on the old queue stay there. Drain the old queue with workers before retiring it.
- **Do not run workers against both names long-term.** The PR is explicit: once a forward is in place, treat the old queue name as deprecated and retire its workers after the drain to avoid race conditions.
- **It does not pause or throttle consumption.** For stopping consumption, use the [queue pause API from Laravel 13.25](https://laravel-news.com/laravel-13-25-0).
- **It does not reduce dispatch volume.** If noisy listeners are the problem, this release also ships [debounced queued listeners](https://laravel-news.com/laravel-debounced-queued-listeners).

Key Takeaways
-------------

- `Queue::forward()` centralises queue routing in a single service provider call.
- Supports renaming, connection switching, or both — individually or in bulk.
- Works with strings and backed enums; no custom driver changes needed.
- Environment-conditional routing replaces scattered `onQueue()` / `onConnection()` calls.
- Applies only to newly dispatched jobs; drain old queues before retiring their workers.

---

*Source: [Queue::forward(): Reroute Laravel Queues in One Place — Laravel News](https://laravel-news.com/laravel-queue-forward)*

 Found this useful?

          [  ](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.msaied.com%2Farticles%2Fqueueforward-reroute-laravel-queues-in-one-place&text=Queue%3A%3Aforward%28%29%3A+Reroute+Laravel+Queues+in+One+Place) [  ](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.msaied.com%2Farticles%2Fqueueforward-reroute-laravel-queues-in-one-place) 

 Frequently Asked Questions 
----------------------------

  3 questions  

     Q01  Does Queue::forward() affect jobs already sitting in the queue?        No. Queue::forward() applies only at dispatch time, so jobs already on the old queue remain there. You need to drain the old queue with workers before retiring it. Running workers against both the original and forwarded queue names long-term can cause race conditions. 

      Q02  Can I use Queue::forward() to route queues differently per environment?        Yes. Because forwards are registered in a service provider's boot() method, you can wrap them in environment checks such as $this-&gt;app-&gt;isProduction(). This lets the same job dispatch code land on a local Redis queue in development and a managed FIFO queue in production without any changes to job classes. 

      Q03  Does Queue::forward() require changes to custom queue drivers?        No. Forwarding resolves through the same getConnection() hook that Queue::route() already uses, with the rename applied by each driver's own queue resolution. There is no new contract for custom drivers to implement. 

  Continue reading

 More Articles 
---------------

 [ View all    ](https://www.msaied.com/articles) 

 [ ![Streaming AI Responses in Laravel: Token Budgets, Structured Output, and Agent Contracts](https://cdn.msaied.com/584/3ffe135721c65ab3f9b40401dc3c41de.png) laravel ai llm 

### Streaming AI Responses in Laravel: Token Budgets, Structured Output, and Agent Contracts

Learn how to stream LLM responses in Laravel, enforce token budgets, and lock structured output to typed PHP c...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 23 Aug 2026     4 min read  

  Read    

 ](https://www.msaied.com/articles/streaming-ai-responses-in-laravel-token-budgets-structured-output-and-agent-contracts) [ ![Typed PHP 8.3 Enums as Eloquent Casts, Route Parameters, and Validation Rules](https://cdn.msaied.com/583/7301900aac0f2ec5d1347df11ce92188.png) laravel php8.3 enums 

### Typed PHP 8.3 Enums as Eloquent Casts, Route Parameters, and Validation Rules

Go beyond basic enum casting. Learn how to wire PHP 8.3 backed enums into Eloquent, route model binding, and c...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 23 Aug 2026     1 min read  

  Read    

 ](https://www.msaied.com/articles/typed-php-83-enums-as-eloquent-casts-route-parameters-and-validation-rules) [ ![Livewire v3 Lazy Components, Islands, and Deferred Loading in Practice](https://cdn.msaied.com/582/564b2d098d2b94b53d4f5319ac77d58b.png) livewire laravel performance 

### Livewire v3 Lazy Components, Islands, and Deferred Loading in Practice

Lazy components, islands, and deferred loading in Livewire v3 let you ship fast initial pages without sacrific...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 23 Aug 2026     1 min read  

  Read    

 ](https://www.msaied.com/articles/livewire-v3-lazy-components-islands-and-deferred-loading-in-practice-1) 

   [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://www.msaied.com)Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

Explore

- [Home](https://www.msaied.com)
- [Projects](https://www.msaied.com/projects)
- [Articles](https://www.msaied.com/articles)
- [Certificates](https://www.msaied.com/certificates)
- [Contact](https://www.msaied.com#contact-section)

Connect

- [   hello@msaied.com ](mailto:hello@msaied.com)
- [   +20 109 461 9204 ](tel:+201094619204)

© 2026 Mohamed Said. All rights reserved.

 [  ](https://github.com/EG-Mohamed) [  ](https://www.linkedin.com/in/msaiedm/) [  ](https://wa.me/201094619204) [  ](mailto:hello@msaied.com) [  ](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
