Bird
0
0

In a Pub/Sub subscription with message ordering enabled, if messages with ordering key 'B' arrive in order M4, M5, M6, but the subscriber processes M5 before M4, what is the expected behavior?

medium📝 Predict Output Q5 of 15
GCP - Cloud Pub/Sub

In a Pub/Sub subscription with message ordering enabled, if messages with ordering key 'B' arrive in order M4, M5, M6, but the subscriber processes M5 before M4, what is the expected behavior?

AMessages will be dropped if processed out of order
BThe subscriber will receive messages in order M5, M4, M6
CThe subscriber will receive messages in order M4, M5, M6 regardless of processing order
DThe subscription disables ordering automatically
Step-by-Step Solution
Solution:
  1. Step 1: Understand delivery vs processing

    Ordering guarantees delivery order, not processing order by subscriber.
  2. Step 2: Recognize subscriber control

    Subscriber can process messages in any order but receives them ordered.
  3. Final Answer:

    The subscriber will receive messages in order M4, M5, M6 regardless of processing order -> Option C
  4. Quick Check:

    Ordering ensures delivery order, not processing order [OK]
Quick Trick: Ordering controls delivery, not subscriber processing [OK]
Common Mistakes:
  • Confusing delivery order with processing order
  • Thinking messages get dropped if processed out of order
  • Assuming subscription disables ordering automatically

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes