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 )

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on April 11, 2025, 10:10