Bird
0
0

Which of the following is the correct way to set prefetch_count to 10 using RabbitMQ's basic.qos command?

easy📝 Syntax Q12 of 15
RabbitMQ - Performance Tuning

Which of the following is the correct way to set prefetch_count to 10 using RabbitMQ's basic.qos command?

A<code>channel.set_qos(10)</code>
B<code>channel.prefetch(10)</code>
C<code>channel.basic_qos(prefetch_count=10)</code>
D<code>channel.qos(prefetch=10)</code>
Step-by-Step Solution
Solution:
  1. Step 1: Recall RabbitMQ client method for QoS

    The correct method to set prefetch count is basic_qos with prefetch_count argument.
  2. Step 2: Match syntax with options

    channel.basic_qos(prefetch_count=10) uses channel.basic_qos(prefetch_count=10), which is the correct syntax.
  3. Final Answer:

    channel.basic_qos(prefetch_count=10) -> Option C
  4. Quick Check:

    basic_qos with prefetch_count sets limit = B [OK]
Quick Trick: Use basic_qos(prefetch_count=number) to set prefetch [OK]
Common Mistakes:
MISTAKES
  • Using incorrect method names like set_qos or prefetch
  • Passing wrong parameter names
  • Confusing method with queue settings

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More RabbitMQ Quizzes