1

We are in the process of moving an existing application from Linode to AWS. On Linode, we used beanstalkd as our message queue and now we wanted to try SQS. We are using 2 queues: default and high. Our configuration for beanstalkd was set like this:

'connections' => [

    'beanstalkd' => [
        'driver' => 'beanstalkd',
        'host' => env('BEANSTALKD_HOST', 'localhost'),
        'queue' => 'default',
        'retry_after' => 86400,
    ],

    'high' => [
        'driver' => 'beanstalkd',
        'host' => env('BEANSTALKD_HOST', 'localhost'),
        'queue' => 'high',
        'retry_after' => 86400,
    ],
],

I'm trying to do something similar now on AWS. The configuration now looks like this:

'connections' => [
    'sqs' => [
        'driver' => 'sqs',
        'key' => env('AWS_KEY'),
        'secret' => env('AWS_SECRET'),
        'prefix' => env('AWS_SQS_URL'),
        'queue' => 'default',
        'region' => env('AWS_REGION'),
    ],

    'high' => [
        'driver' => 'sqs',
        'key' => env('AWS_KEY'),
        'secret' => env('AWS_SECRET'),
        'prefix' => env('AWS_SQS_URL'),
        'queue' => 'high',
        'region' => env('AWS_REGION'),
    ],        
],

I created a queue on AWS called 'dev' and I have this URL: https://sqs.eu-west-2.amazonaws.com/ACCOUNT-ID/dev The error I'm getting is this:

Error executing "ReceiveMessage" on "https://sqs.eu-west-2.amazonaws.com/ACCOUNT-ID/dev/high"; AWS HTTP error: Client error: `POST https://sqs.eu-west-2.amazonaws.com/ACCOUNT-ID/dev/high` resulted in a `400 Bad Request` response:
<?xml version="1.0"?><ErrorResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><Error><Type>Sender</Type><Code>A (truncated...)
 AWS.SimpleQueueService.NonExistentQueue (client): The specified queue does not exist for this wsdl version. - <?xml version="1.0"?><ErrorResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><Error><Type>Sender</Type><Code>AWS.SimpleQueueService.NonExistentQueue</Code><Message>The specified queue does not exist for this wsdl version.</Message><Detail/></Error><RequestId>REQUEST-ID</RequestId></ErrorResponse>

It says "The specified queue does not exist". Should I create different queue in AWS or is there a problem in my configuration?

Supervisor configuration:

[program:worker]
command=php /home/dev/default/current/artisan queue:work sqs --sleep=0 --daemon --quiet --timeout=0 --delay=3 --tries=3 --env=development --queue="high,default"

process_name=%(program_name)s_%(process_num)02d
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=dev
numprocs=8
stdout_logfile=
Andrej
  • 415
  • 1
  • 7
  • 25

1 Answers1

3

Sorry for the late reply. I searched google for same problem and I found this question.

The url should be https://sqs.eu-west-2.amazonaws.com/your-account-id. no queue name after the url. So you need to remove dev from the url.

Thanks

Tapas
  • 113
  • 14