Open
Description
Symfony version(s) affected
All
Description
MessageDecodingFailedException
should not delete a message from the queue.
try {
$envelope = $this->serializer->decode([
'body' => $sqsEnvelope['body'],
'headers' => $sqsEnvelope['headers'],
]);
} catch (MessageDecodingFailedException $exception) {
$this->connection->delete($sqsEnvelope['id']);
throw $exception;
}
Issues it causes
- Since decoding is not exactly reverse of encoding with arrays (int vs string keys), legitimate messages end up being dropped.
- Any other kind of dev ops error can mess up the decoding temporarily.