In an earlier experiment , the clearest result wasn't about the model at all. When the same support ticket was delivered twice, the agent made two audited follow-up calls, unless the application deduplicated them.
The deduplication in my demo was a Set in memory. That's fine for a demo. In production it has two problems:
It forgets on restart. If the consumer creates the follow-up and dies before acknowledging the message, Kafka delivers it again to a fresh process with an empty set. The follow-up call happens again.
It drops real work. It was keyed on the ticket, so a customer's second, genuine callback request on the same ticket was silently ignored.
So I added an opt-in mode that stores the follow-up as a database row, and then tried to break it by killing the consumer at the worst possible moment.β¦