File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change 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 .
1010Laravel expects SQS messages to be generated in a
1111specific 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
121121Framework.
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
125151If a 3rd-party application or API Gateway to SQS implementation is creating
You can’t perform that action at this time.
0 commit comments