Laravel 12.34 introduced a native failover queue driver that automatically falls back to backup queue connections when the primary one fails. Configuration involves setting QUEUE_CONNECTION=failover and listing ordered connections (e.g., Redis → database) in config/queue.php. Key gotchas: failover only applies when pushing jobs, not consuming them, so workers must be run for each connection separately. The post covers three practical patterns (speed-first, small tools, bigger apps), how to test failover by stopping Redis, and how to listen for the QueueFailedOver event to get notified when a failover occurs.
Table of contents
What is the Laravel failover queue driver?Quick start (copy-paste)How to run workers and Horizon (don’t point them at failover )Three practical patterns (pick one)How you can test the failover driverGet a heads-up when failover happens (simple event listener)Gotchas I noted while testingFAQFinal thought8 Impressions