Skip to content

Commit c67b1ff

Browse files
committed
Added more docs
1 parent 58792e3 commit c67b1ff

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Total Downloads](https://img.shields.io/packagist/dt/palpalani/laravel-sqs-queue-json-reader.svg?style=flat-square)](https://packagist.org/packages/palpalani/laravel-sqs-queue-json-reader)
77

88

9-
Custom SQS queue reader for Laravel projects that supports raw JSON payloads.
9+
Custom SQS queue reader for Laravel projects that supports raw JSON payloads and reads multiple messages.
1010
Laravel expects SQS messages to be generated in a
1111
specific format that includes job handler class and a serialized job.
1212

@@ -120,6 +120,32 @@ Above code will push the following JSON object to SQS queue:
120120
'job' field is not used, actually. It's just kept for compatibility with Laravel
121121
Framework.
122122

123+
### Processing job
124+
125+
Run the following commnd for testing the dispatched job.
126+
127+
`php artisan queue:work sqs-json`
128+
129+
For production, use supervisor with the following configuration.
130+
131+
```
132+
[program:sqs-json-reader]
133+
;process_name=%(program_name)s
134+
process_name=%(program_name)s_%(process_num)02d
135+
command=php /srv/app/artisan queue:work sqs-json --sleep=20 --timeout=50 --tries=2 --memory=128 --daemon
136+
directory=/srv/app
137+
autostart=true
138+
autorestart=true
139+
startretries=10
140+
user=root
141+
numprocs=1
142+
redirect_stderr=true
143+
stdout_logfile=/srv/app/horizon.log
144+
stderr_logfile=/tmp/horizon-error.log
145+
stopwaitsecs=3600
146+
priority=1000
147+
```
148+
123149
### Receiving from SQS
124150

125151
If a 3rd-party application or API Gateway to SQS implementation is creating

0 commit comments

Comments
 (0)