Kafka 4.2 made share groups production-ready: queue-style consumption where several consumers take records from the same partitions. Each record is locked to one consumer while it works on it. The default lock is 30 seconds.
Now put an AI agent behind that consumer. One event means a model call, maybe a tool call or two, maybe a retry. Forty seconds is not unusual.
So what happens when the agent is still thinking when the lock expires?
I measured it. Short version: the same event is processed again, up to five times, and every side effect it triggers can happen again. The fixes that work are not the ones I expected, and one framework's built-in fix did not hold.
Why this matters for agents
Classic Kafka consumers are fast: milliseconds per record. A 30-second lock is generous for them.…