Transactional outbox and idempotent consumer: no more lost or duplicated events
Calling save() and then kafkaTemplate.send() inside one @Transactional can still lose an event or publish one for an order that was rolled back. Fix it with an outbox (Debezium, SKIP LOCKED) and an idempotent consumer.







