multiple amazon sqs queues with laravel - Stack Overflow

I have setup two queues (calculator-webhook-queue & offers-queue) on Amazon SQS with the following

I have setup two queues (calculator-webhook-queue & offers-queue) on Amazon SQS with the following code:-

In .env file

QUEUE_CONNECTION=sqs
AWS_DEFAULT_REGION=us-east-1
AWS_ACCESS_KEY_ID=*******
AWS_SECRET_ACCESS_KEY=*******
SQS_PREFIX=*******
SQS_QUEUE=calculator-webhook-queue

In queue.php config file

  'connections' => [
        'sqs' => [
            'driver' => 'sqs',
            'key' => env('AWS_ACCESS_KEY_ID'),
            'secret' => env('AWS_SECRET_ACCESS_KEY'),
            'prefix' => env('SQS_PREFIX', ''),
            'queue' => env('SQS_QUEUE', 'default'),
            'suffix' => env('SQS_SUFFIX'),
            'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
            'after_commit' => false,
        ]

    ],

In supervisor config file on Amazon server

[program:amazon-sqs]
directory=/var/www/html/****
command=php artisan queue:work sqs --queue=calculator-webhook-queue,offers-queue
 
process_name=%(program_name)s_%(process_num)02d
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
;user=web
numprocs=3
redirect_stderr=true
stdout_logfile=/var/www/html/****/storage/logs/amazon-sqs.log
stopwaitsecs=58 

I have two jobs that are dispatched like this into separate queue

PropertyOffersJob::dispatch($webhookData)->onConnection('sqs')->onQueue('offers-queue');
PropertyTaxJob::dispatch($webhookData)->onConnection('sqs')->onQueue('calculator-webhook-queue');

Both are working fine but are only pushed to the same queue "calculator-webhook-queue". I want each to go to their respective queues. Please help me where I am messing?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745210286a4616796.html

相关推荐

  • multiple amazon sqs queues with laravel - Stack Overflow

    I have setup two queues (calculator-webhook-queue & offers-queue) on Amazon SQS with the following

    5小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信