|
5 | 5 | [](https://packagist.org/packages/palpalani/laravel-sqs-queue-json-reader)
|
6 | 6 |
|
7 | 7 |
|
8 |
| -Custom SQS queue reader for Laravel that supports JSON payloads. |
9 |
| -Out of the box, Laravel expects SQS messages to be generated in a |
10 |
| -specific format - format that includes job handler class and a serialized job. |
| 8 | +Custom SQS queue reader for Laravel that supports plain JSON payloads. |
| 9 | +Laravel expects SQS messages to be generated in a |
| 10 | +specific format that includes job handler class and a serialized job. |
11 | 11 |
|
12 |
| -But in certain cases you may want to parse messages from third party |
| 12 | +But in certain cases you may want to parse messages from 3rd party |
13 | 13 | applications, custom JSON messages and so on.
|
14 | 14 |
|
15 | 15 | ## Installation
|
@@ -96,16 +96,19 @@ class ExampleController extends Controller
|
96 | 96 | }
|
97 | 97 | }
|
98 | 98 | ```
|
99 |
| -This will push the following JSON object to SQS: |
| 99 | +Above code will push the following JSON object to SQS queue: |
100 | 100 |
|
101 | 101 | ```json
|
102 |
| -{"job":"App\\Jobs\\SqsHandler@handle","data":{"music":"Sample message","time":1464411642}} |
| 102 | +{"job":"App\\Jobs\\SqsHandler@handle","data":{"music":"Sample SQS message","time":1464511672}} |
103 | 103 | ```
|
104 | 104 |
|
105 |
| -'job' field is not used, actually. It's just kept for compatibility. |
| 105 | +'job' field is not used, actually. It's just kept for compatibility with Laravel |
| 106 | +Framework. |
106 | 107 |
|
107 |
| -Receiving from SQS |
108 |
| -If a third-party application is creating custom-format JSON messages, just add a |
| 108 | +### Receiving from SQS |
| 109 | + |
| 110 | +If a 3rd-party application or API Gateway to SQS implementation is creating |
| 111 | +custom-format JSON messages, just add a |
109 | 112 | handler in the config file and implement a handler class as follows:
|
110 | 113 |
|
111 | 114 | ```php
|
|
0 commit comments