maxRetries; $message = $message->getMessage(); if ($message instanceof EnvelopeInterface) { $retryCount = $message->getRetryCount(); } return $retries < $retryCount; } /** * @param \Throwable|null $throwable The cause of the failed handling */ public function getWaitingTime(Envelope $message, ?\Throwable $throwable = null): int { $retries = RedeliveryStamp::getRetryCountFromEnvelope($message); $delay = $this->delayMilliseconds * $this->multiplier ** $retries; return (int) ceil($delay); } }