0
0
RabbitMQdevops~10 mins

Lazy queues for memory management in RabbitMQ - Interactive Code Practice

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

Complete the code to declare a lazy queue in RabbitMQ using the command line.

RabbitMQ
rabbitmqadmin declare queue name=my_lazy_queue durable=true arguments={'x-queue-mode': '[1]'}
Drag options to blanks, or click blank then click option'
Alazy
Beager
Cdefault
Dtransient
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'eager' instead of 'lazy' causes messages to stay in memory.
2fill in blank
medium

Complete the JSON configuration snippet to declare a lazy queue in RabbitMQ.

RabbitMQ
{
  "queue": "my_queue",
  "durable": true,
  "arguments": {"x-queue-mode": "[1]"}
}
Drag options to blanks, or click blank then click option'
Alazy
Btransient
Ceager
Ddefault
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'eager' will keep messages in RAM, increasing memory usage.
3fill in blank
hard

Fix the error in the queue declaration command to make the queue lazy.

RabbitMQ
rabbitmqadmin declare queue name=task_queue durable=true arguments={'x-queue-mode': '[1]'}
Drag options to blanks, or click blank then click option'
Aeager
Bdefault
Clazy
Dtransient
Attempts:
3 left
💡 Hint
Common Mistakes
Leaving the mode as 'eager' causes high memory usage.
4fill in blank
hard

Fill both blanks to declare a durable lazy queue with the correct argument key and value.

RabbitMQ
rabbitmqadmin declare queue name=lazy_queue durable=true arguments={{'[1]': '[2]'}}
Drag options to blanks, or click blank then click option'
Ax-queue-mode
Bdurable
Clazy
Dtransient
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'durable' as argument key or 'transient' as value.
5fill in blank
hard

Fill all three blanks to create a Python dictionary for a lazy queue declaration with the correct key, value, and durability flag.

RabbitMQ
{'[1]': '[2]', 'durable': [3]
Drag options to blanks, or click blank then click option'
Ax-queue-mode
Blazy
Ctrue
Dfalse
Attempts:
3 left
💡 Hint
Common Mistakes
Setting durable to false or using wrong keys or values.