You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1531,6 +1532,29 @@ $invoicePaid = (new InvoicePaid($invoice))
1531
1532
$user->notify($invoicePaid);
1532
1533
```
1533
1534
1535
+
<aname="queue-failover"></a>
1536
+
### Queue Failover
1537
+
1538
+
The `failover` queue driver provides automatic failover functionality when pushing jobs to the queue. If the primary queue connection fails for any reason, Laravel will automatically attempt to push the job to the next configured connection in the list. This is particularly useful for ensuring high availability in production environments where queue reliability is critical.
1539
+
1540
+
To configure a failover queue connection, specify the `failover` driver and provide an array of connection names to attempt in order:
1541
+
1542
+
```php
1543
+
'failover' => [
1544
+
'driver' => 'failover',
1545
+
'connections' => [
1546
+
env('QUEUE_CONNECTION', 'database'),
1547
+
'sync',
1548
+
],
1549
+
],
1550
+
```
1551
+
1552
+
Once you have configured a connection that uses the `failover` driver, you will probably want to set the failover connection as your default queue connection in your application's `.env` file:
0 commit comments