Skip to the content.

Kafka-GCP Consideration

Kafka

GCP Pub/Sub

Understanding Pub/Sub

Pub/Sub vs Pub/Sub Lite

  Pub/Sub Pub/Sub Lite
Price [1] ~$2000/month - Zonal: ~$169/month
- Regional: ~$608/month
Reliability Highest - Zonal: Best effort
- Regional: Similar SLA to normal Pub/Sub
Resources Managed Pre-provisioned
Data replication - ≥ 2 zones
- Best effort 3rd additional zone
- Zonal: No replication
- Regional: Async backup to 2nd zone

Kafka vs Pub/Sub

  Kafka Pub/Sub (Lite)
Deployment - Cloud (Confluent)
- On-premise (current)
- Cloud
Message
delivery (default)
At least once Exactly once
Message flow Offset increments,
message remains
Message deleted on acknowledgement
Message order Within partitions / same key Within topics

More information can be found here.

Dev

  1. Migration from Kafka to Pub/Sub (link).
  2. KafkaJS manual committing for exactly-once semantics (EOS) (link).
    1. Java example.
    2. librdkafka - C/C++ Kafka client to support EOS (link).
    3. Blizzard’s Node.js wrap on librdkafka (link).
  3. Pub/Sub Client (Node.js) — not sure if it works with pub/sub lite.
  4. Pub/Sub Lite library (Go/Java/Python)
  5. Pub/Sub Lite API (REST)(RPC)