Ends in:
2 DAYS
3 HRS
20 MIN
2 SEC
Ends in:
2 D
3 H
20 M
2 S
Open Closed

Order / Priority of events #3433


User avatar
0
cala created

Hi, we would like to know: how to define the event receive order ?

Currently you add the IDistributedEventHandler interface to your receiving class - if it depends on the execution of another handler for the same event, the only solution we found so far is to create a new event so you always have a 1-to-1 relation between event and receiver.

So is there a better way than creating new events for each step ?


2 Answer(s)
  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    There is no event receive order. It is very much against the nature of async communication.

    If you have a process that needs to be done sequentially, you can use HTTP calls awaiting each other.

  • User Avatar
    0
    cala created

    well that would mean we have to do http calls from the repository to other services - which breaks the separation between domain and data access provider.

    So how do you ensure all services have up to day data ? another approach ( beside events ) would be locking - you have DistributedLocking, but the documentation is very basic, it is possible to lock only for writes ? ( allow reads without locking if no write lock is aquired )

Made with ❤️ on ABP v9.1.0-preview. Updated on December 02, 2024, 12:35