if ($envelope->
last(MessageDecodingFailedStamp::
class)) { throw new \
RuntimeException(sprintf('The message with id "%s" could not decoded, it can only be shown or removed.',
$this->
getMessageId($envelope) ?? '?'
));
} $shouldHandle =
$shouldForce || 'retry' ===
$io->
choice('Please select an action',
['retry', 'delete'
], 'retry'
);
if ($shouldHandle) { return;
} $messageReceivedEvent->
shouldHandle(false
);
$receiver->
reject($envelope);
};
$this->eventDispatcher->
addListener(WorkerMessageReceivedEvent::
class,
$listener);
$worker =
new Worker( [$failureTransportName =>
$receiver],
$this->messageBus,
$this->eventDispatcher,
$this->logger
);