Bird
0
0

Which of the following is the correct syntax to set prefetch count to 5 using the RabbitMQ Java client channel?

easy📝 Syntax Q3 of 15
RabbitMQ - Performance Tuning

Which of the following is the correct syntax to set prefetch count to 5 using the RabbitMQ Java client channel?

Achannel.setPrefetchCount(5);
Bchannel.setQos(5);
Cchannel.prefetch(5);
Dchannel.basicQos(5);
Step-by-Step Solution
Solution:
  1. Step 1: Recall Java client method

    The RabbitMQ Java client uses basicQos to set prefetch count.
  2. Step 2: Verify correct syntax

    Correct method call is channel.basicQos(5); other options are invalid methods.
  3. Final Answer:

    channel.basicQos(5); -> Option D
  4. Quick Check:

    Java client prefetch syntax = basicQos() [OK]
Quick Trick: Use basicQos() to set prefetch in Java client [OK]
Common Mistakes:
MISTAKES
  • Using non-existent methods like setPrefetchCount
  • Confusing method names with other clients
  • Missing parentheses in method call

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More RabbitMQ Quizzes