Browse Source

Update Distributed-Event-Bus.md

pull/15134/head
Halil İbrahim Kalkan 3 years ago
parent
commit
03a326efdd
  1. 2
      docs/en/Distributed-Event-Bus.md

2
docs/en/Distributed-Event-Bus.md

@ -360,6 +360,8 @@ public class ProductSynchronizer
}
````
> Notice that the `EntitySynchronizer` can only create/update the entities after you use it. If you have an existing system with existing data, you should manually copy the data for one time, because the `EntitySynchronizer` starts to work.
## Transaction and Exception Handling
Distributed event bus works in-process (since default implementation is `LocalDistributedEventBus`) unless you configure an actual provider (e.g. [Kafka](Distributed-Event-Bus-Kafka-Integration.md) or [RabbitMQ](Distributed-Event-Bus-RabbitMQ-Integration.md)). In-process event bus always executes event handlers in the same [unit of work](Unit-Of-Work.md) scope that you publishes the events in. That means, if an event handler throws an exception, then the related unit of work (the database transaction) is rolled back. In this way, your application logic and event handling logic becomes transactional (atomic) and consistent. If you want to ignore errors in an event handler, you must use a `try-catch` block in your handler and shouldn't re-throw the exception.

Loading…
Cancel
Save