Urgent.News

What's breaking now, across thousands of outlets.

Tech

You decide when the deed is done: Manual commit of offsets in Kafka.

Tú decides cuándo hecho es hecho: Commit manual de offsets en Kafka. Día 06 de la serie técnica WKafka Open Source. Si tu consumidor se apaga justo después de leer un mensaje con auto_commit=True, ese mensaje se perdió para siempre. El commit manual te devuelve el control. Los Problemas Reales El auto-commit marcando mensajes como 'procesados' antes de guardar en base de datos Pérdida silenciosa…

Translated from Spanish Read in Spanish

The WKafka Open Source series continues with its sixth technical day, focusing on manual offset commits in Kafka. When a consumer shuts down right after reading a message with auto_commit=True, that message is lost forever, but manual commits provide control over this process. Manual commits solve issues such as premature marking of messages as processed, silent data loss, and phantom accounting discrepancies.

The implementation involves setting auto_commit=False in WKafka and using msg.commit() after successfully saving to the database. This architecture ensures zero data loss and clean restarts, and has been tested and verified against real Apache Kafka clusters.

Written by urgent.news from Dev.to's report — not a translation of it. Machine-written — may contain errors; check the original before relying on it.

Also reported by 1 other outlet

Read the original at dev.to →

More in Tech

More from Sunday 27 September →