try { $envelope =
$this->serializer->
decode([ 'body' =>
$beanstalkdEnvelope['body'
],
'headers' =>
$beanstalkdEnvelope['headers'
],
]);
} catch (MessageDecodingFailedException
$exception) { $this->connection->
reject($beanstalkdEnvelope['id'
]);
throw $exception;
} return [$envelope->
with(new BeanstalkdReceivedStamp($beanstalkdEnvelope['id'
],
$this->connection->
getTube()))];
} public function ack(Envelope
$envelope): void
{ $this->connection->
ack($this->
findBeanstalkdReceivedStamp($envelope)->
getId());
} public function reject(Envelope
$envelope): void
{ $this->connection->
reject($this->
findBeanstalkdReceivedStamp($envelope)->
getId());
}