0
0
Laravelframework~10 mins

Queue configuration in Laravel - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the default queue connection in Laravel's config.

Laravel
'default' => env('QUEUE_CONNECTION', '[1]'),
Drag options to blanks, or click blank then click option'
Aredis
Bdatabase
Csqs
Dsync
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'redis' or 'database' without configuring them first.
Leaving the default connection blank.
2fill in blank
medium

Complete the code to specify the queue driver in the .env file.

Laravel
QUEUE_CONNECTION=[1]
Drag options to blanks, or click blank then click option'
Aredis
Bdatabase
Csqs
Dsync
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'sync' when asynchronous processing is needed.
Forgetting to install and configure Redis.
3fill in blank
hard

Fix the error in the queue configuration array to set the Redis queue connection.

Laravel
'redis' => [
    'driver' => '[1]',
    'connection' => 'default',
],
Drag options to blanks, or click blank then click option'
Adatabase
Bredis
Csync
Dsqs
Attempts:
3 left
💡 Hint
Common Mistakes
Setting driver to 'database' or 'sync' by mistake.
Misspelling 'redis' in the driver key.
4fill in blank
hard

Fill both blanks to configure the database queue connection with the correct driver and table name.

Laravel
'database' => [
    'driver' => '[1]',
    'table' => '[2]',
    'queue' => 'default',
    'retry_after' => 90,
],
Drag options to blanks, or click blank then click option'
Adatabase
Bjobs
Credis
Dfailed_jobs
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'redis' as driver for database connection.
Setting table name to 'failed_jobs' instead of 'jobs'.
5fill in blank
hard

Fill the blanks to configure the SQS queue connection with driver and queue URL.

Laravel
'sqs' => [
    'driver' => '[1]',
    'key' => env('AWS_ACCESS_KEY_ID'),
    'queue' => env('[2]'),
    'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
Drag options to blanks, or click blank then click option'
Aredis
BSQS_QUEUE_URL
Csqs
DQUEUE_URL
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'redis' as driver for SQS.
Confusing environment variable names for queue URL.