Is there a method on the Queue class that can specify a specific connection as defined in the queue config? There's a similar option for MySql, where you can define 'mysql2', and then call:
DB::connection('mysql2')->table('etc')->get();
Is there a similar option for queues?
Something like:
Queue::connection('sqs2')->push('MyQueue', array('message' => $message));
Apparently I answered my own question above without even realizing it. You can have multiple queues and specify which one you want to push the message to by using a connection method.
Here's what my partial config looks like for anybody that's interested:
'default' => 'sqs',
'connections' => array(
'sync' => array(
'driver' => 'sync',
),
'beanstalkd' => array(
'driver' => 'beanstalkd',
'host' => 'localhost',
'queue' => 'default',
),
'sqs' => array(
'driver' => 'sqs',
'key' => 'xxxxxxxxxxxx',
'secret' => 'yyyyyyyyyyyyyy',
'queue' => 'https://sqs.us-west-2.amazonaws.com/zzzzzzzzz',
'region' => 'us-west-2',
),
'sqs2' => array(
'driver' => 'sqs',
'key' => 'uuuuuuuuuuuuu',
'secret' => 'vvvvvvvvvvvvvvvv',
'queue' => 'https://sqs.us-west-2.amazonaws.com/wwwwwwwwwww',
'region' => 'us-west-2',
),
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With