Consumer Group Configuration

The same stream of payment events feeds three teams, and each one reads it as its own consumer group: fraud scoring (block or allow a payment, right now), analytics (dashboards and totals) and audit logging (the permanent record regulators inspect). Each group keeps its own offset, a bookmark saying "I've read up to message #N", and the three bookmarks move independently. The table below sets two consumer properties per group:

auto.offset.reset answers one question: when a group has no saved bookmark (a brand-new group, or its bookmark expired), where does it start? latest skips everything already in the topic and reads only new messages. earliest starts from the oldest message still retained. Fraud uses latest because a two-hour-old payment has already gone through, so scoring it now is pointless. Analytics and audit use earliest because missing any event means wrong totals or a broken audit trail.

enable.auto.commit = false for all three. With auto-commit on, the consumer moves the bookmark forward on a timer (every 5 s by default) whether or not processing has finished. A crash after the bookmark moved but before the message was handled loses that message for good. Turning it off means "I move the bookmark myself, after the work is done."

Consumer Groupauto.offset.resetenable.auto.commitCommit strategyNotes
Fraud scoringlatestfalseManual, after processingLow-latency; skip old events on restart
AnalyticsearliestfalseManual, after batch writeCan replay; correctness > latency; idempotent writes required — crash mid-batch reprocesses up to one full batch, so naive appends/increments would double-count
Audit loggingearliestfalseManual, transactionalMust never drop; idempotent writes required