if ($maxDelayMilliseconds < 0
) { throw new InvalidArgumentException(sprintf('Max delay must be greater than or equal to zero: "%s" given.',
$maxDelayMilliseconds));
} $this->maxDelayMilliseconds =
$maxDelayMilliseconds;
} /**
* @param \Throwable|null $throwable The cause of the failed handling
*/
public function isRetryable(Envelope
$message, \Throwable
$throwable = null
): bool
{ $retries = RedeliveryStamp::
getRetryCountFromEnvelope($message);
return $retries <
$this->maxRetries;
} /**
* @param \Throwable|null $throwable The cause of the failed handling
*/
public function getWaitingTime(Envelope
$message, \Throwable
$throwable = null
): int
{ $retries = RedeliveryStamp::
getRetryCountFromEnvelope($message);