core-java icon indicating copy to clipboard operation
core-java copied to clipboard

Reconsider message filtering by the Bus

Open mdrachuk opened this issue 7 years ago • 0 comments

Currently, the Bus filters are applied as follows:

  1. ValidatingFilter;
  2. DeadMessageFilter;
  3. custom filters (including CommandScheduler).

This creates an odd behavior where a dead or invalid message can’t be processed by a custom filter in any way, although it may be required for logging or similar purposes.

This already creates an issue for a dead Event which is filtered out by the DeadMessageFilter but still gets stored.

Simply moving the custom filters to be executed after the ValidatingFilter and prior to the DeadMessageFilter seemed like a proper solution at first, but then the issue is the CommandScheduler being executed prior to the DeadMessageFilter.

This ambiguity suggests that we need to reconsider how the message filtering is performed, and how default filters are applied.

mdrachuk avatar Feb 01 '18 13:02 mdrachuk