You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Laravel SQS Queue Reader is a powerful extension designed to seamlessly integrate external webhooks into your Laravel application. By leveraging the reliability and scalability of Amazon Simple Queue Service (SQS), this extension ensures that your application efficiently processes incoming webhooks, minimizing downtime and enhancing overall performance.
7
+
The Laravel SQS Queue Reader is an extension designed to seamlessly integrate external webhooks into your Laravel application. By leveraging the reliability and scalability of Amazon Simple Queue Service (SQS), this package ensures your application efficiently processes incoming webhooks, minimizing downtime and enhancing overall performance.
8
8
9
-
### Key Features:
9
+
### Key Features
10
10
11
-
#### Effortless Webhook Integration:
11
+
#### Effortless Webhook Integration
12
12
13
-
Easily integrate external webhooks into your Laravel application without compromising on performance.
13
+
Easily integrate external webhooks into your Laravel application without compromising performance.
14
14
15
-
#### Queue-Based Processing:
15
+
#### Queue-Based Processing
16
16
17
-
Harness the power of Amazon SQS to queue incoming webhooks, allowing for asynchronous and parallel processing, ensuring optimal response times.
17
+
Harness Amazon SQS to queue incoming webhooks for asynchronous and parallel processing, ensuring optimal response times.
18
18
19
-
#### Reliability and Scalability:
19
+
#### Reliability and Scalability
20
20
21
-
SQS provides a robust and scalable infrastructure, ensuring that your application can handle varying webhook loads without compromising on stability.
21
+
SQS provides a robust and scalable infrastructure so your application can handle varying webhook loads without compromising stability.
22
22
23
-
#### Seamless Laravel Integration:
23
+
#### Seamless Laravel Integration
24
24
25
-
Designed as a Laravel extension, the Webhook Queue Reader seamlessly integrates into your Laravel project, following Laravel's coding standards and conventions.
25
+
Designed as a Laravel extension, the Queue Reader integrates cleanly into your project, following Laravel's coding standards and conventions.
26
26
27
-
#### Configurable Settings:
27
+
#### Configurable Settings
28
28
29
-
Customize the extension's settings to align with your application's requirements, including queue names, visibility timeout, and other SQS-specific configurations.
29
+
Customize settings to align with your application's requirements, including queue names, visibility timeout, and other SQS-specific configurations.
30
30
31
-
#### Detailed Logging:
31
+
#### Detailed Logging
32
32
33
-
Gain insights into the webhook processing flow with detailed logging, helping you troubleshoot and monitor the system effectively.
33
+
Gain insights into the webhook processing flow with detailed logging to help troubleshoot and monitor effectively.
34
34
35
-
### How It Works:
35
+
### How It Works
36
36
37
-
#### Webhook Registration:
37
+
#### Webhook Registration
38
38
39
39
Register external webhooks with your Laravel application by providing the webhook URL.
40
40
41
-
#### SQS Queue Integration:
41
+
#### SQS Queue Integration
42
42
43
-
Incoming webhooks are efficiently processed through the SQS queue, ensuring optimal handling of webhook payloads.
43
+
Incoming webhooks are processed through the SQS queue, ensuring optimal handling of webhook payloads.
44
44
45
-
#### Asynchronous Processing:
45
+
#### Asynchronous Processing
46
46
47
-
Leverage the asynchronous processing capabilities of SQS to handle webhooks in the background, preventing any impact on your application's response times.
47
+
Leverage asynchronous processing to handle webhooks in the background, preventing impact on your application's response times.
48
48
49
-
#### Automatic Retries:
49
+
#### Automatic Retries
50
50
51
-
Benefit from SQS's automatic retries, ensuring that failed webhook processing attempts are retried without manual intervention.
51
+
Benefit from SQS automatic retries, ensuring failed webhook processing attempts are retried without manual intervention.
52
52
53
53
[](https://packagist.org/packages/palpalani/laravel-sqs-queue-json-reader)
Custom SQS queue reader for Laravel projects that supports raw JSON payloads and reads multiple messages. Laravel expects SQS messages to be generated in a specific format that includes job handler class and a serialized job.
63
+
Custom SQS queue reader for Laravel projects that supports raw JSON payloads and reads multiple messages. Laravel expects SQS messages to be generated in a specific format that includes a job handler class and a serialized job.
64
64
65
-
Note: Implemented to read multiple messages from queue.
65
+
Note: Implemented to read multiple messages from the queue.
66
66
67
-
This library is very useful when you want to parse messages from 3rd party
68
-
applications such as stripe webhooks, shopify webhooks, mailgun web hooks, custom JSON messages and so on.
67
+
This library is useful when you want to parse messages from 3rd-party applications such as Stripe webhooks, Shopify webhooks, Mailgun webhooks, custom JSON messages, and more.
69
68
70
69
## Getting Started
71
70
72
-
Install Custom SQS queue reader for Laravel via composer:
{"job":"App\\Jobs\\SqsHandler@handle","data":{"music":"Ponni nathi from PS-1","singer":"AR. Rahman","time":1464511672}}
175
174
```
176
175
177
-
'job' field is not used, actually. It's just kept for compatibility with Laravel
178
-
Framework.
176
+
The `job` field is not used; it is kept for compatibility with the Laravel framework.
179
177
180
-
### Processing job
178
+
### Processing Job
181
179
182
-
Run the following commnd for testing the dispatched job.
180
+
Run the following command to test the dispatched job.
183
181
184
182
`php artisan queue:work sqs-json`
185
183
186
-
For `production`, use supervisor with the following configuration.
184
+
For production, use Supervisor with the following configuration.
187
185
188
186
```
189
187
[program:sqs-json-reader]
@@ -202,14 +200,11 @@ stopwaitsecs=3600
202
200
priority=1000
203
201
```
204
202
205
-
If you are using multiple connection, then duplicate above supervisor
206
-
configutation and change the connection name.
203
+
If you are using multiple connections, duplicate the above Supervisor configuration and change the connection name.
207
204
208
205
### Receiving from SQS
209
206
210
-
If a 3rd-party application or API Gateway to SQS implementation is creating
211
-
custom-format JSON messages, just add a
212
-
handler in the config file and implement a handler class as follows:
207
+
If a 3rd-party application or an API Gateway-to-SQS implementation is creating custom-format JSON messages, add a handler in the config file and implement a handler class as follows:
213
208
214
209
```php
215
210
use Illuminate\Contracts\Queue\Job as LaravelJob;
@@ -240,28 +235,28 @@ Note:
240
235
241
236
Ensure that your Laravel application is configured with the necessary AWS credentials and permissions to interact with SQS.
242
237
243
-
Enhance your Laravel application's webhook processing capabilities with the Laravel Webhook Queue Reader. Efficient, reliable, and designed for optimal performance!
238
+
Enhance your Laravel application's webhook processing capabilities with the Laravel SQS Queue Reader. Efficient, reliable, and designed for optimal performance!
244
239
245
-
For more information about AWS SQS check [offical docs](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-queue-parameters.html).
240
+
For more information about AWS SQS, check the [official docs](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-queue-parameters.html).
246
241
247
242
## Testing
248
243
249
-
We already configured the script, just run the command:
244
+
We already configured the scripts; just run the command:
250
245
251
246
```bash
252
247
composer test
253
248
```
254
249
255
-
For test coverage format, run the command:
250
+
For test coverage, run the command:
256
251
```bash
257
252
composer test-coverage
258
253
```
259
-
For code analyse, run the command:
254
+
For code analysis, run the command:
260
255
261
256
```bash
262
257
composer analyse
263
258
```
264
-
For code format, run the command:
259
+
For code formatting, run the command:
265
260
266
261
```bash
267
262
composer format
@@ -275,14 +270,14 @@ Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed re
275
270
276
271
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.
277
272
278
-
If you want to contribute, then you may want to test it in a real Laravel project:
273
+
If you want to contribute, you may want to test it in a real Laravel project:
279
274
280
275
- Fork this repository to your GitHub account.
281
276
- Create a Laravel app locally.
282
277
- Clone your fork in your Laravel app's root directory.
283
278
- In the `/laravel-sqs-queue-json-reader` directory, create a branch for your fix, e.g. `feature/awesome-feature`.
284
279
285
-
Install the packages in your app's `composer.json`:
280
+
Install the package in your app's `composer.json`:
286
281
287
282
```jsonc
288
283
{
@@ -303,21 +298,21 @@ Install the packages in your app's `composer.json`:
303
298
304
299
Now, run `composer update`.
305
300
306
-
## Other Laravel packages
301
+
## Other Laravel Packages
307
302
308
-
[GrumPHP rector task](https://github.com/palpalani/grumphp-rector-task) GrumPHP with a task that runs [RectorPHP](https://github.com/rectorphp/rector-src) for your Laravel projects.
303
+
[GrumPHP Rector task](https://github.com/palpalani/grumphp-rector-task) GrumPHP with a task that runs [RectorPHP](https://github.com/rectorphp/rector-src) for your Laravel projects.
309
304
310
-
[Email Deny List (blacklist) Check - IP Deny List (blacklist) Check](https://github.com/palpalani/laravel-dns-deny-list-check) Deny list (blacklist) checker will test a mail server IP address against over 50 DNSbased email blacklists. (Commonly called Realtime blacklist, DNSBL or RBL).
305
+
[Email Deny List (blacklist) Check - IP Deny List (blacklist) Check](https://github.com/palpalani/laravel-dns-deny-list-check) Deny list (blacklist) checker that tests a mail server IP address against 50+ DNS-based email blacklists (commonly called Realtime blacklist, DNSBL, or RBL).
311
306
312
-
[Spamassassin spam score of emails](https://github.com/palpalani/laravel-spamassassin-score) Checks the spam score of email contents using spamassassin database.
307
+
[SpamAssassin spam score of emails](https://github.com/palpalani/laravel-spamassassin-score) Checks the spam score of email contents using the SpamAssassin database.
313
308
314
-
[Laravel Login Notifications](https://github.com/palpalani/laravel-login-notifications) A login event notification for Laravel projects. By default, it will send notification only on production environment only.
309
+
[Laravel Login Notifications](https://github.com/palpalani/laravel-login-notifications) A login event notification for Laravel projects. By default, it sends notifications only in the production environment.
315
310
316
-
[Laravel Toastr](https://github.com/palpalani/laravel-toastr) Implements toastr.js for Laravel. Toastr.js is a Javascript library for non-blocking notifications.
311
+
[Laravel Toastr](https://github.com/palpalani/laravel-toastr) Implements toastr.js for Laravel. Toastr.js is a JavaScript library for non-blocking notifications.
317
312
318
-
[Beast](https://github.com/palpalani/beast) Beast is Screenshot as a Service using Nodejs, Chrome and Aws Lamda. Convert a webpage to an image using headless Chrome Takes screenshot of any given URL/Html content and returns base64 encoded buffer.
313
+
[Beast](https://github.com/palpalani/beast) Beast is Screenshot as a Service using Node.js, Chrome, and AWS Lambda. Convert a webpage to an image using headless Chrome; takes a screenshot of any given URL/HTML content and returns a base64-encoded buffer.
319
314
320
-
[eCommerce Product Recommendations](https://github.com/palpalani/eCommerce-Product-Recommendations)Analyse order history of customers and recommend products for new customers which enables higher sales volume.
315
+
[eCommerce Product Recommendations](https://github.com/palpalani/eCommerce-Product-Recommendations)Analyze order history of customers and recommend products for new customers to enable higher sales volume.
321
316
322
317
## Security Vulnerabilities
323
318
@@ -330,7 +325,7 @@ Please review [our security policy](../../security/policy) on how to report secu
330
325
331
326
## Need Help?
332
327
333
-
If you spot a bug or have a question or feature request, please [submit a detailed issue](https://github.com/palpalani/laravel-sqs-queue-json-reader/issues), and wait for assistance.
328
+
If you spot a bug or have a question or feature request, please [submit a detailed issue](https://github.com/palpalani/laravel-sqs-queue-json-reader/issues) and wait for assistance.
0 commit comments