@@ -183,11 +183,11 @@ Event store is used as a write database, and SQL or NoSQL database as a read dat
183
183
### <a id =" 3-6 " ></a >Event handlers
184
184
185
185
Commands generate events.
186
- Event processing is done by ** event handles ** .
186
+ Event processing is done by ** event handlers ** .
187
187
As a part of event processing, we may need to update projections,
188
188
send a message to a message broker, or make an API call.
189
189
190
- There are two types of event handles : ** synchronous** and ** asynchronous** .
190
+ There are two types of event handlers : ** synchronous** and ** asynchronous** .
191
191
192
192
Storing the write model and read model in the same database allows for transactional updates of the read model.
193
193
Each time we append a new event, the projection is updated ** synchronously** in the same transaction.
@@ -264,6 +264,8 @@ Appending an event operation consists of 2 SQL statements in a single transactio
264
264
` ` `
265
265
` pg_current_xact_id()` returns the current transaction' s ID. The need for this will be explained later.
266
266
267
+ 
268
+
267
269
### <a id="4-4"></a>Snapshotting
268
270
269
271
On every *nth* event insert an aggregate state (snapshot) to the `ES_AGGREGATE_SNAPSHOT` table specifying the version
@@ -338,7 +340,7 @@ New events are processed by polling the `ES_EVENT` table.
338
340
339
341

340
342
341
- Since multiple backend instances can run in parallel,
343
+ Since multiple instances of this application can run in parallel,
342
344
we need to ensure that any processing only affects the event once.
343
345
We don' t want more than one event handler instance to handle the same event.
344
346
@@ -481,6 +483,8 @@ This mechanism is used by default as more efficient.
481
483
After restarting the backend, existing subscriptions will only process new events after the last processed event
482
484
and not everything from the first one.
483
485
486
+ > [!WARNING]
487
+ > Critical content demanding immediate user attention due to potential risks.
484
488
New subscriptions (event handlers) in the first poll will read and process all events.
485
489
Be careful, if there are too many events, they may take a long time to process.
486
490
0 commit comments