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;
    }
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;
    }
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 ; }
Fail the message. This will retry it if possible.

@param $queueName the queue from which the message originated
@param $env The envelope containing the message
@return bool True if the message will be retried.
Fail the message . This will retry it if possible .