@@ -219,20 +219,18 @@ column of `ORDER_EVENT_OUTBOX` table.
219219
220220### <a name="0cfc0523189294ac086e11c8e286ba2d"></a>Drawbacks
221221
222- 1. Polling database' s * outbox* table for new messages with fixed delay introduces a big lag (delay
223- between polls) in eventual consistency between the write and read models.
222+ 1. The asynchronous replication leads to the eventual consistency between the write and read models.
223+ But polling database' s * outbox* table for new messages with a fixed delay introduces pretty big
224+ full consistency lag (greater than or equal to the fixed delay between polls).
2242252 . ** The Outbox handler might process an event more than once.** It might crash after processing an
225- event but before recording the fact that it has done so. When it restarts, it will then publish
226- the message again.
226+ event but before recording the fact that it has done so. When it restarts, it will then process
227+ the message again ( update the read model and send an integration event) .
227228
228- Consumers of events should be idempotent and filter duplicates and out of order integration events.
229+ Integration events are delivered with at- least- once delivery guarantee. The exactly- once delivery
230+ guarantee is hard to achieve due to a dual- write. A dual- write describes a situation when you need
231+ to atomically update the database and publish messages and two- phase commit (2PC) is not an option.
229232
230- If your system can' t accept even small chance of duplicates or unordering, then Message Relay must
231- be extracted into a separate microservice and run in a single replica (
232- `.spec.replicas=1` in Kubernetes). This microservice must not be updated using RollingUpdate
233- Deployment strategy. Recreate Deployment strategy must be used
234- instead (`.spec.strategy.type=Recreate`
235- in Kubernetes) when all existing Pods are killed before new ones are created.
233+ Consumers of events should be idempotent and filter duplicates and out of order integration events.
236234
237235# # <a name="53af957fc9dc9f7083531a00fe3f364e"></a>How to Run the Sample?
238236
0 commit comments