CodeExplorer AckStamp example
return;
} $acked = false;
$ack =
function DEnvelope
$envelope, \Throwable
$e = null
) use ($transportName, &
$acked) { $acked = true;
$this->acks
[] =
[$transportName,
$envelope,
$e];
};
try { $e = null;
$envelope =
$this->bus->
dispatch($envelope->
with(new ReceivedStamp($transportName),
new ConsumedByWorkerStamp(),
new AckStamp($ack)));
} catch (\Throwable
$e) { } $noAutoAckStamp =
$envelope->
last(NoAutoAckStamp::
class);
if (!
$acked && !
$noAutoAckStamp) { $this->acks
[] =
[$transportName,
$envelope,
$e];
} elseif ($noAutoAckStamp) { $this->unacks
[$noAutoAckStamp->
getHandlerDescriptor()->
getBatchHandler()] =
[$envelope->
withoutAll(AckStamp::
class),
$transportName];
}