try { return $this->connection->
countMessagesInQueues();
} catch (\AMQPException
$exception) { throw new TransportException($exception->
getMessage(), 0,
$exception);
} } private function rejectAmqpEnvelope(\AMQPEnvelope
$amqpEnvelope, string
$queueName): void
{ try { $this->connection->
nack($amqpEnvelope,
$queueName, \AMQP_NOPARAM
);
} catch (\AMQPException
$exception) { throw new TransportException($exception->
getMessage(), 0,
$exception);
} } private function findAmqpStamp(Envelope
$envelope): AmqpReceivedStamp
{ $amqpReceivedStamp =
$envelope->
last(AmqpReceivedStamp::
class);
if (null ===
$amqpReceivedStamp) { throw new LogicException('No "AmqpReceivedStamp" stamp found on the Envelope.'
);
}