Category : amazon-sqs

I would like to send message from Laravel app to Symfony app via AWS SQS : Laravel app: Only responsible publish message. I use Job, following docs: https://laravel.com/docs/8.x/queues#dispatching-jobs Symfony app: Only responsible consume message. I use Messenger, following docs: https://symfony.com/doc/current/messenger.html They don’t seem to recognize each other. Is there any documents tell about this? Source: ..

Read more

I am connecting AWS SQS FIFO Queue in Laravel , I want to retrieve queue from AWS SQS with Laravel. Here is my env file QUEUE_CONNECTION=sqs AWS_ACCESS_KEY_ID=RRKKKAKIAWY7CM4EBHHHH AWS_SECRET_ACCESS_KEY=qN25sCiUvrArRdtF+HWbL6zdXFK6lo5SR563 AWS_DEFAULT_REGION=eu-west-1 SQS_PREFIX=https://sqs.eu-west-1.amazonaws.com/465941881099 SQS_QUEUE=NewTestNotificationQueue AWS_BUCKET= I installed composer require aws/aws-sdk-php and using Laravel Framework 7.30.4 But while executing php artisan queue:listen I am getting error as follows [2021-10-06 ..

Read more

I’m working with Laravel using SQS method configured and currently when new message push onto the queue I use dispatch as follows: dispatch(new BackupVideosProcessor($folder, $session)); The messages are executed in parallel. I’m trying to figure how can I set the amount of maximum jobs running at the same time without losing queue idea. I mean ..

Read more

I have created a data migrator using the Laravel v8.x queue system and some batched jobs. For the queue backend, I am using AWS SQS. Without changing any of the code, one day jobs started failing randomly with the following error: /var/www/data-migrator/vendor/aws/aws-sdk-php/src/AwsClient.php:275 Instances of AwsSqsSqsClient cannot be serialized The stack trace points to the following ..

Read more

I am implementing AWS SQS job queue using "aws/aws-sdk-php": "^3.185". Jobs are processed correctly (pull job -> process job -> delete job) on my VPS using queue command: php artisan queue:work But with the same credential, in Lambda enviroments , Job can’t be deleted after finished. In shorthand, pull job -> process job –X–> delete ..

Read more

I have done the supervisord setup with following code for the file : /etc/supervisor/conf.d/queue-worker.conf. [program:queue-worker-callbacks] process_name=%(program_name)s_%(process_num)02d command=sudo php /var/www/backend/current/artisan queue:work sqs-plain –queue=callbacks autostart=true autorestart=true user=root numprocs=1 redirect_stderr=true stdout_logfile=/var/www/backend/shared/storage/logs/supervisord_logs.log but the supervisord is taking a delay of 45 seconds between each process execution.see the log result below [2021-05-16 17:11:56] Processing: [email protected] starting job processing done the ..

Read more

I’m hosting a laravel page on aws elastic beanstalk. For queueing I’m using SQS. I want to execute php artisan queue:work on the server by writing it into my init.config file in the .ebextensions folder. Now this works once: After the code is deployed every job in the queue gets executed but after that when ..

Read more

I’m hosting a laravel page on aws elastic beanstalk. For queueing I’m using SQS. I want to execute nohup php artisan queue:work –daemon > /dev/null 2>&1 & on the server by writing it into my init.config file in the .ebextensions folder. Now this works once: After the code is deployed every message in the queue ..

Read more

How to pass priorities (high, medium, low) in AWS SQS in Lumen PHP. Packages "php": "^7.3|^8.0", "aws/aws-sdk-php": "^3.158", "laravel/lumen-framework": "^8.0" queqe.php <?php return [ ‘default’ => env(‘QUEUE_CONNECTION’, ‘sqs’), ‘connections’ => [ ‘sqs’ => [ ‘driver’ => ‘sqs’, ‘key’ => ‘key’, ‘secret’ => ‘secret’, ‘prefix’ => ‘https://sqs.us-east-1.amazonaws.com/1234567891452’, ‘queue’ => ”, ‘suffix’ => ‘dev-test-app’, ‘region’ => ‘us-east-1’, ..

Read more

Have a laravel project and code block like below $pendingToProcessFiles = PendingToProcessFile::where(‘tries’, ‘<‘, 3)->orderBy(‘created_at’)->get(); Log::channel(‘upload-to-s3-jobs-log’)->info("Using queue {$this->queue}"); foreach ($pendingToProcessFiles as $index => $pendingToProcessFile) { $jobObject = new UploadToS3Job($pendingToProcessFile); dispatch($jobObject->onQueue($this->queue)); } This works as expected in my local machine (laradock), and doesn’t matter if I have a lot of records in table, that belongs to PendingToProcessFile ..

Read more

I am trying to set up multiple queues in my queue.php in laravel. Documentation found specifies how to set up a queue, and talks about multiple queues, but does not specify how to set them up in queue.php ‘sqs-fifo’ => [ ‘driver’ => ‘sqs-fifo’, ‘key’ => env(‘AWS_ACCESS_KEY_ID’), ‘secret’ => env(‘AWS_SECRET_ACCESS_KEY’), ‘prefix’ => env(‘SQS_PREFIX’, ‘myqueurl’), ‘queue’ ..

Read more