From ca36ff57ea8b81f9bf0a3c82e8a8c26d56a3bfba Mon Sep 17 00:00:00 2001 From: Scott Dutton Date: Wed, 24 Mar 2021 16:45:58 +0000 Subject: [PATCH 1/4] Stop Attributes The message size is currently being doubled as the message is in both the body and the attributes --- src/Connector/SQS.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Connector/SQS.php b/src/Connector/SQS.php index 8ab8875..7d617f2 100644 --- a/src/Connector/SQS.php +++ b/src/Connector/SQS.php @@ -104,6 +104,10 @@ private function getMessageAttributes(array $message) : array { $messageAttributes = []; foreach ($message as $key => $value) { + if ($key == "message") { + continue; + } + $messageAttributes[$key] = [ 'DataType' => 'String', 'StringValue' => $value, From 01417cff7fe0a2f9b7d6a05fe13b4ad5dc2a4806 Mon Sep 17 00:00:00 2001 From: Scott Dutton Date: Wed, 24 Mar 2021 16:47:01 +0000 Subject: [PATCH 2/4] Update SQS.php --- src/Connector/SQS.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Connector/SQS.php b/src/Connector/SQS.php index 7d617f2..ad99713 100644 --- a/src/Connector/SQS.php +++ b/src/Connector/SQS.php @@ -104,7 +104,7 @@ private function getMessageAttributes(array $message) : array { $messageAttributes = []; foreach ($message as $key => $value) { - if ($key == "message") { + if ($key === "message") { continue; } From 5609e170f68fdb89a9f5e7c4bcba5976cbe744e7 Mon Sep 17 00:00:00 2001 From: Scott Dutton Date: Wed, 24 Mar 2021 20:44:55 +0000 Subject: [PATCH 3/4] Update SQS.php --- src/Connector/SQS.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Connector/SQS.php b/src/Connector/SQS.php index ad99713..0e36de0 100644 --- a/src/Connector/SQS.php +++ b/src/Connector/SQS.php @@ -107,7 +107,7 @@ private function getMessageAttributes(array $message) : array if ($key === "message") { continue; } - + $messageAttributes[$key] = [ 'DataType' => 'String', 'StringValue' => $value, From 98f3df421aff552e2d76dfe7e90926d6b35aa37b Mon Sep 17 00:00:00 2001 From: Scott Dutton Date: Wed, 24 Mar 2021 20:47:42 +0000 Subject: [PATCH 4/4] Update SQS.php --- src/Connector/SQS.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Connector/SQS.php b/src/Connector/SQS.php index 0e36de0..fc47b1f 100644 --- a/src/Connector/SQS.php +++ b/src/Connector/SQS.php @@ -104,8 +104,8 @@ private function getMessageAttributes(array $message) : array { $messageAttributes = []; foreach ($message as $key => $value) { - if ($key === "message") { - continue; + if ($key === 'message') { + continue; } $messageAttributes[$key] = [