I have a system that manages words and relations between them. As a manager, I can create words and I can create relations between words (A is synonym of B or X is proper spelling of Z). My service provides a word model that also contains all current relations to and from that word. I find that in certain operations, my notifications are inaccurate, for example:
In one single operation, I create a new word: A "CreateWord" notification is published in the scope that contains this new word
In that same operation, I create a relation with a different word: A "CreateRelation" notification is published in the scope that contains the new relation
The operation completes and the notifications are sent to the notification handlers: the "CreateWord" notification does not contain the relation that was just created, because at the time publishing, it didn't exist.
As it happens, the CreateRelation notification is handled first, then the CreateWord notification. Now my index is out-of-sync because it's missing the relation
How do you deal with this? This is Umbraco 10.6.1