// wait for final message (but max at 3 seconds)
$envelopes =
$this->
receiveEnvelopes($receiver, 3
);
// duration should be about 2 seconds
$this->
assertApproximateDuration($startTime, 2
);
/* @var RedeliveryStamp|null $retryStamp */
// verify the stamp still exists from the last send
$this->
assertCount(1,
$envelopes);
$retryStamp =
$envelopes[0
]->
last(RedeliveryStamp::
class);
$this->
assertNotNull($retryStamp);
$this->
assertSame(1,
$retryStamp->
getRetryCount());
$receiver->
ack($envelope);
} public function testRetryAffectsOnlyOriginalQueue() { $connection = Connection::
fromDsn(getenv('MESSENGER_AMQP_DSN'
),
[ 'exchange' =>
[ 'name' => 'messages_topic',
'type' => 'topic',
'default_publish_routing_key' => 'topic_routing_key',
],