How can I set up Laravel queues using database/Redis connection so that job does not fail for the Mailtrap rate limit of five emails per 10 secs? For example, I tried to execute six jobs with two workers using Redis. But the 6th job failed with the error below in failed jobs table.
Too many emails per second.
Redis::throttle('key')->allow(5)->every(10)->then(function () {
$email = new WelcomeEmail();
Mail::to('info@test.com')->send($email);
}, function () {
return $this->release(7);
});