Skip to content

Commit 8e18d2b

Browse files
author
palPalani
committed
Fix getting mmultiple message
1 parent dbece1a commit 8e18d2b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Sqs/Queue.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,18 @@ private function modifyPayload($payload, $class)
115115
foreach ($payload as $item) {
116116
//Log::debug('Each Messages==', [$item]);
117117
$body[] = json_decode($item['Body'], true);
118+
$attributes = $item['Attributes'];
118119
}
119120

120121
$body = [
121122
'job' => $class . '@handle',
122123
'data' => $body,
123124
];
124125

125-
$payload['Body'] = json_encode($body);
126+
$newPayload['Body'] = json_encode($body);
127+
$newPayload['Attributes'] = $attributes;
126128

127-
return $payload;
129+
return $newPayload;
128130
}
129131

130132
/**

0 commit comments

Comments
 (0)