public function __construct( private readonly MessageGeneratorInterface
$messageGenerator,
) { } public function get(): iterable
{ foreach ($this->messageGenerator->
getMessages() as $context =>
$message) { $stamp =
new ScheduledStamp($context);
if ($message instanceof RedispatchMessage
) { $message =
new RedispatchMessage( Envelope::
wrap($message->envelope,
[$stamp]),
$message->transportNames,
);
} yield Envelope::
wrap($message,
[$stamp]);
} } public function ack(Envelope
$envelope): void
{