GCP Study Hub

Big Data

Pub/Sub

Fully managed, real-time messaging and event streaming

AWS equivalent

SQS + SNS / Kinesis Data Streams

MessagingStreamingEvent-driven
🔄

AWS → GCP: Key Differences

  • Pub/Sub is closer to Kinesis Data Streams for streaming or SNS+SQS combined for pub/sub patterns.

  • Fully global by default: messages published in one region can be consumed globally.

  • At-least-once delivery by default.

📌

Key Concepts to Know

  • 1

    Topics (producers publish to) and Subscriptions (consumers pull from or push to).

  • 2

    Push subscriptions: Pub/Sub delivers messages to your endpoint. Pull: your service polls.

  • 3

    Dead letter topics: route undeliverable messages for debugging.

  • 4

    Message retention: up to 7 days.

  • 5

    Ordering keys: guarantee in-order delivery for messages with the same key.

💡

DCE Interview Tips

  • Core pipeline anchor: 'Every real-time data architecture on GCP starts with Pub/Sub. It decouples producers from consumers and handles any ingestion rate.'

  • 'For your IoT factory scenario: sensors → Pub/Sub. It absorbs traffic spikes. Dataflow then processes the stream.'

⚠️

Common Gotchas

  • !

    Pub/Sub does NOT guarantee message ordering unless you use ordering keys.

  • !

    Messages are acknowledged per-subscription — if you have 3 subscriptions, each message is delivered to all 3.