Make dispatcher pluggable - #8840
Conversation
zymap
left a comment
There was a problem hiding this comment.
Does this need to update doc? Please open an issue to track doc if needed.
| + " non-backlog consumers as well.") | ||
| private boolean dispatchThrottlingOnNonBacklogConsumerEnabled = false; | ||
|
|
||
| // <-- Pluggable dispatcher --> |
There was a problem hiding this comment.
Do we need to add the following configurations into the broker.conf and standalone.conf?
sijie
left a comment
There was a problem hiding this comment.
@MarvinCai Thank you for putting this up!
But I think we should only have one DispatchFactory interface and it can be used for creating dispatchers for different subscription types. We shouldn't introduce that many configuration settings.
Also it might be worth writing a PIP for this effort.
rdhabalia
left a comment
There was a problem hiding this comment.
The goal of making dispatcher pluggable is to avoid any computation and complexity in the dispatch path. So, we should target to make dispatching-path pluggable rather than making dispatcher pluggable. I thinking making dispatcher pluggable will add a lot of work for the user and will be complex. It will also make implementation simpler without adding configuration for each dispatcher as well. So, we should create a PIP for this feature and discuss it.
We were also working on the same feature proposal. so, if it's fine then we can submit the proposal and start the discussion.
Fixes #8834
Motivation
Make dispatcher pluggable so we can support features like #8544 without changing default dispatcher.
Modifications
Moved Dispatcher interface and abstract classes to dispatcher packages to make package hierarchy a bit cleaner.
Add configuration for specifying customized dispatcher for persistent/nonpersistent + subtype combination.
Create util class to load customized dispatcher from NAR file.
Create factory class to supply dispatcher based on provided configuration.
Verifying this change
Existing test cases passed, added new unit tests for util class and dispatcher factory.
Does this pull request potentially affect one of the following parts:
Documentation