Foundationপ্রথম নীতি থেকে
LEVEL 9 · Distributed Systems

Consumer Offset

কনজিউমার অফসেট

Log-এ consumer কোথায় পৌঁছেছে সেই bookmark — crash/rebalance-এর পর সেখান থেকেই আবার শুরু।

also: offset-commit

Commit timing-ই দর্শন ঠিক করে:

process → commit → ack     : crash-এ হারবে (at-most-once-ish)
process → ack   → commit   : crash-এ দ্বিগুণ হবে (at-least-once) ← সাধারণ বাছাই
  • Offset store-ও durable state — Kafka-তে __consumer_offsets topic; ওটা নিজেই replicated
  • Rebalance storm: partition reassign হলে stale commit অন্য consumer- এর duplicate বা gap দুটোই করতে পারে — idempotent handler-ই বিমা
  • Monitoring metric-এর রাজা consumer lag (latest − committed) — alert, autoscaling, backpressure সব ওর পেছনে