AmazonSqsReceivedStamp example

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);
        }
    }

    
Home | Imprint | This part of the site doesn't use cookies.