laravel-queue-rabbitmq icon indicating copy to clipboard operation
laravel-queue-rabbitmq copied to clipboard

How to change failed jobs driver to redis?

Open BehroozBvk opened this issue 3 years ago • 1 comments

Hi, how can I change the driver of failed jobs to redis in rabbitmq? If the QUEUE_CONNECTION is on rabbitmq

BehroozBvk avatar Jun 25 '22 07:06 BehroozBvk

Does anyone have an idea? @vyuldashev

BehroozBvk avatar Jun 30 '22 11:06 BehroozBvk

Hi @BehroozBvk.

The best solution for this is to override the queue.failer container with your own implementation of the FailedJobProviderInterface.

Here is the laravel code for how failed jobs are written to the database. https://github.com/laravel/framework/blob/bce222337fe66ddea035cf21d05b4a3d97d15bbc/src/Illuminate/Queue/Failed/DatabaseFailedJobProvider.php#L9

Here are where they are defined for laravel https://github.com/laravel/framework/blob/bce222337fe66ddea035cf21d05b4a3d97d15bbc/src/Illuminate/Foundation/Application.php#L1359 https://github.com/laravel/framework/blob/bce222337fe66ddea035cf21d05b4a3d97d15bbc/src/Illuminate/Queue/QueueServiceProvider.php#L245

M-Porter avatar Jan 26 '23 00:01 M-Porter

This is a great question but unfortunately it has nothing to do with the library itself so I am going to close it.

M-Porter avatar Jan 26 '23 00:01 M-Porter