try { $envelope =
$this->serializer->
decode([ 'body' =>
$sqsEnvelope['body'
],
'headers' =>
$sqsEnvelope['headers'
],
]);
} catch (MessageDecodingFailedException
$exception) { $this->connection->
delete($sqsEnvelope['id'
]);
throw $exception;
} yield $envelope->
with(new AmazonSqsReceivedStamp($sqsEnvelope['id'
]));
} public function ack(Envelope
$envelope): void
{ try { $this->connection->
delete($this->
findSqsReceivedStamp($envelope)->
getId());
} catch (HttpException
$e) { throw new TransportException($e->
getMessage(), 0,
$e);
} }