CodeExplorer getRetryStrategyForTransport example
$this->retryStrategyLocator =
$retryStrategyLocator;
$this->logger =
$logger;
$this->eventDispatcher =
$eventDispatcher;
$this->historySize =
$historySize;
} /**
* @return void
*/
public function onMessageFailed(WorkerMessageFailedEvent
$event) { $retryStrategy =
$this->
getRetryStrategyForTransport($event->
getReceiverName());
$envelope =
$event->
getEnvelope();
$throwable =
$event->
getThrowable();
$message =
$envelope->
getMessage();
$context =
[ 'class' =>
$message::
class,
];
$shouldRetry =
$retryStrategy &&
$this->
shouldRetry($throwable,
$envelope,
$retryStrategy);
$retryCount = RedeliveryStamp::
getRetryCountFromEnvelope($envelope);