Jul 25, 2021
Hi there, good write. Quick thoughts, maybe I am missing something here, but why can't it be handled this way:
- Start a transaction to the Order database table
- Write to that table with the record
- Then publish to the event broker on new order as an event (not any other OUTBOX table)
- Commit the started transaction in the first step
In this case you would never need to use OUTBOX table, but would eventually just rely on transaction block to ensure both the operations are done in a sync. In case the event was not written to the event broker, then the SQL can be rolledback.