Queue::forward(): Reroute Laravel Queues in One Place | Mohamed Said       [Skip to content](#main)  [ ![](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png) Mohamed SaidLaravel Backend Engineer ](https://msaied.com) - [Home](https://msaied.com)
- [Projects](https://msaied.com/projects)
- [Articles](https://msaied.com/articles)
- [Certificates](https://msaied.com/certificates)
- [About](https://msaied.com#about)

           [  Contact](https://msaied.com#contact) Menu 

Menu
----

Close 

 - [HomeStart here](https://msaied.com)
- [ProjectsCase studies](https://msaied.com/projects)
- [ArticlesEngineering notes](https://msaied.com/articles)
- [CertificatesCredentials](https://msaied.com/certificates)
- [AboutHow I work](https://msaied.com#about)
- [ContactGet in touch](https://msaied.com#contact)

  [Start a conversation](https://msaied.com#contact) [WhatsApp](https://wa.me/201094619204) [Email](mailto:hello@msaied.com) 

 1. [Home](https://msaied.com)
2. /
3. [Articles](https://msaied.com/articles)
4. /
5. [Laravel](https://msaied.com/articles?category=laravel)
6. /
7. Queue::forward(): Reroute Laravel Queues in One Place

   [Laravel](https://msaied.com/articles?category=laravel) 

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

 Laravel 13.26 introduces Queue::forward(), letting you redirect any queue to a different name, connection, or both from a single service provider method — no changes to job classes or dispatch sites required.

 ![](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp) [Mohamed Said](https://msaied.com#person) Published 19 Aug 2026 · Updated 20 Aug 2026 · 3 min read

ShareCopy linkCopied

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

  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)

 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)*

- [Laravel](https://msaied.com/articles?search=Laravel)
- [Queues](https://msaied.com/articles?search=Queues)
- [Laravel 13.26](https://msaied.com/articles?search=Laravel%2013.26)
- [PHP](https://msaied.com/articles?search=PHP)
- [Queue Routing](https://msaied.com/articles?search=Queue%20Routing)

 Frequently asked questions 
---------------------------

  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.

   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.

   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.

   ![Mohamed Said](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp)About the author
----------------

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

[About](https://msaied.com#about) [GitHub ↗](https://github.com/EG-Mohamed) [LinkedIn ↗](https://www.linkedin.com/in/msaiedm/) [WhatsApp ↗](https://wa.me/201094619204) [Email Address ↗](mailto:hello@msaied.com) [My CV ↗](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)  

   [Previous articleLaravel Tackle: Run an AI Coding Agent Inside Your Laravel Application](https://msaied.com/articles/laravel-tackle-run-an-ai-coding-agent-inside-your-laravel-application) [Next articleAdvanced Authorization in Laravel: Gates, Policies, and Response-Based Access Control](https://msaied.com/articles/advanced-authorization-in-laravel-gates-policies-and-response-based-access-control-4)  

   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)

 ###  Have a technical challenge?

 Tell me what you’re building. I reply within two working days.

[Start a conversation](https://msaied.com#contact) 

   Related articles
-----------------

 [ ![](https://cdn.msaied.com/739/2d6897fdcdcf090613f96f72a64b8a78.png)  · 4 min read### MySQL Full-Text Search in Laravel: Indexes, Relevance Scoring, and Boolean Mode

4 Oct 2026 ](https://msaied.com/articles/mysql-full-text-search-in-laravel-indexes-relevance-scoring-and-boolean-mode) [ ![](https://cdn.msaied.com/738/073696a3fefe18bec825beec5ac658f5.png)  · 4 min read### Laravel Queue Rate-Limited Middleware: Throttling Jobs Without Losing Work

4 Oct 2026 ](https://msaied.com/articles/laravel-queue-rate-limited-middleware-throttling-jobs-without-losing-work) [ ![](https://cdn.msaied.com/737/f5c7e78a645325d4cff8d43f2835f136.png)  · 4 min read### Laravel Telescope Alternatives: Structured Observability with Pulse, Debugbar, and Custom Watchers

4 Oct 2026 ](https://msaied.com/articles/laravel-telescope-alternatives-structured-observability-with-pulse-debugbar-and-custom-watchers) 

  Have a technical challenge?
----------------------------

Tell me what you’re building. I reply within two working days.

 [Discuss your project ↗](https://msaied.com#contact) 

  © 2026 Mohamed Said · Built with Laravel, meant to last.Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

 - [Home](https://msaied.com)
- [Articles](https://msaied.com/articles)
- [Certificates](https://msaied.com/certificates)
- [GitHub](https://github.com/EG-Mohamed)
- [LinkedIn](https://www.linkedin.com/in/msaiedm/)
- [WhatsApp](https://wa.me/201094619204)
- [Email Address](mailto:hello@msaied.com)
- [My CV](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
- [Sitemap](https://msaied.com/sitemap.xml)
