-
Task
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
5
-
False
-
-
False
-
-
We have several places in our code where we need to write to the database and then send a kafka message in a single transaction. This isn't currently handled in quarkus so when one operation fails the other may still succeed, resulting in a mismatch between the database and kafka.
One such scenario is where we create a billable_usage_remittance record and send a billable-usage kafka message in the same transaction.
To handle this we can implement the transactional outbox pattern: https://microservices.io/patterns/data/transactional-outbox.html
Things to address:
- Database design
- Impotence of consumers
- Message relay (some options mentioned here: https://microservices.io/patterns/data/transactional-outbox.html#related-patterns)
Done:
- Design document created and reviewed with team
- Stories created