Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ordering of event handler instance/type group selectors #1028

Open
m1l4n54v1c opened this issue Mar 14, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@m1l4n54v1c
Copy link
Member

commented Mar 14, 2019

Currently, the selection of processing groups for event handlers goes by this priority:

  1. Try to select the processing group based on the instance selector (EventProcessingConfigurer#assignHandlerInstancesMatching(String processingGroup, int priority, Predicate<Object> criteria))
  2. If there is none, try to select the processing group based on the @ProcessingGroup annotation on the event handler
  3. If there is none, try to select the processing group based on the instance fallback selector (which defaults to fully qualified package name and can be overridden using EventProcessingConfigurer#byDefaultAssignHandlerInstancesTo(Function<Object, String> assignmentFunction))
  4. If there is none, try to select the processing group based on the type selector (EventProcessingConfigurer#assignHandlerTypesMatching(String processingGroup, int priority, Predicate<Class<?>> criteria))
  5. If there is none, try to select the processing group based on the type fallback selector (which defaults to classSimpleName + "Processor")

The rationale behind this one is to always go through the instance selectors first since they are more specific than type selectors.

Based on google groups question it might be more clear to have the following ordering:
1)
4)
2)
3)
5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.