protected function failed(string $queueName, Envelope $env) : bool
    {
        $retry = $this->retries->canRetry($env);
        if ($retry) {
            $delay = $this->retries->retryDelay($env);
            $this->getDriver()->retry($queueName, $env->retry($delay));
        } else {
            $this->getDriver()->fail($queueName, $env);
        }

        return $retry;
    }