@tr8norman you can do this using the onConnection function.
MyJob::dispatch(); // will dispatch to default connection
//you should:
MyJob::onConnection('redis_a')->dispatch();
//or
MyJob::onConnection('redis_b')->dispatch();
// to dispatch on specific connections
On your database.php https://github.com/laravel/laravel/blob/8.x/config/database.php#L129 you should have the following:
'redis' => [
...
'redis_a' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
],
'redis_b' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
],
...
]
Of course, change it to your true credentials but you get the point.
And to have your redis_a becomes the default driver, change default to redis_a: https://github.com/laravel/laravel/blob/8.x/config/queue.php#L67
Then make sure you clear your configs :)
I noticed that I can still see jobs that I submitted to Redis B in Pending jobs of horizon of Application X Since you didn't define where you should dispatch your jobs, you dispatched all your jobs to the default connection.