I’m making use of the suggestions posited by Yvonne’s excellent blog entry on set-based validation to create an annotation-based framework in my project to enforce uniqueness. I’m using a parameter resolver on the command side to test for uniqueness, but this question is for providing values to the lookup table.
The blog suggests using a event processor configured to run in subscribing mode so that it always executes in the thread that published the event. In the documentation, it appears that event dispatch interceptors also run in the thread that publishes the event, and it’s a simpler interface to implement against.
What would be the consequences of implementing this in a dispatch interceptor versus an event processor? Are there potential gotchas that would be avoided with a subscribing event processor?