File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -284,17 +284,16 @@ do is to write your own CSV receiver::
284
284
285
285
public function get(): void
286
286
{
287
- $ordersFromCsv = $this->serializer->deserialize(file_get_contents($this->filePath), 'csv');
288
-
289
- foreach ($ordersFromCsv as $orderFromCsv) {
290
- $order = new NewOrder($orderFromCsv['id'], $orderFromCsv['account_id'], $orderFromCsv['amount']);
291
-
292
- $envelope = new Envelope($order);
293
-
294
- $handler($envelope);
287
+ // Receive the envelope according to your transport ($yourEnvelope here),
288
+ // in most case, using a connection is the easiest solution.
289
+
290
+ if (null === $yourEnvelope) {
291
+ return [];
295
292
}
296
-
297
- return [$envelope];
293
+
294
+ // Reject the message if needed
295
+
296
+ return [$yourEnvelope->with(new CustomStamp($yourEnvelope['id']);
298
297
}
299
298
300
299
public function ack(Envelope $envelope): void
You can’t perform that action at this time.
0 commit comments