return [ // must have higher priority than SendFailedMessageToFailureTransportListener
WorkerMessageFailedEvent::
class => ['onMessageFailed', 99
],
WorkerMessageHandledEvent::
class => 'onMessageHandled',
SendMessageToTransportsEvent::
class => ['onMessageSent', 99
],
];
} public function onMessageFailed(WorkerMessageFailedEvent
$event): void
{ if ($event->
willRetry()) { return;
} $this->
handle($event->
getEnvelope(), false
);
} public function onMessageHandled(WorkerMessageHandledEvent
$event): void
{ $this->
handle($event->
getEnvelope(), false
);
}