Bird
0
0

What is the likely cause if messages with the same ordering_key arrive out of order in Google Cloud Pub/Sub?

medium📝 Debug Q14 of 15
GCP - Cloud Pub/Sub

What is the likely cause if messages with the same ordering_key arrive out of order in Google Cloud Pub/Sub?

AOrdering is not enabled on the subscription
BMessages have different data payloads
CThe topic is encrypted
DThe publisher is using batching
Step-by-Step Solution
Solution:
  1. Step 1: Identify ordering requirements

    Both publisher and subscriber must support ordering for it to work.
  2. Step 2: Analyze cause of disorder

    If subscription does not enable ordering, messages may arrive out of order despite ordering_key.
  3. Final Answer:

    Ordering is not enabled on the subscription -> Option A
  4. Quick Check:

    Subscription must enable ordering [OK]
Quick Trick: Enable ordering on both publisher and subscriber [OK]
Common Mistakes:
  • Blaming message content for order
  • Assuming encryption affects order
  • Thinking batching breaks ordering

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes