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
[ROCKETMQ-135] Broker cannot be properly finalized on failure to load… #73
Conversation
… a storage plugin. JIRA issue: https://issues.apache.org/jira/browse/ROCKETMQ-135
Folks, |
… a storage plugin. JIRA issue: https://issues.apache.org/jira/browse/ROCKETMQ-135
2 similar comments
@shroman user may have several plugins as Decorator Patterns, and |
@Jaskey For a decorated class, you don't write "DecoratedClassA, DecoratedClassB, DecoratedClassC" in your properties, do you? :) You just specify your outer class, say "DecoratedClassC", and initialize. Inheritance and composition are done for you. The current code explicitly initializes all classes, and use only the latest one. |
@shroman Do you concern about the properties ways or the code implementations or the functionality? If you are concerning about the property way, may be we can discuss more about it. But supportive to list of plugins instead of only one will help user easily to pile up their plugin components. As to the decorator pattern way, for example , user has three decorator plugins say DecoratedClassA, DecoratedClassB, DecoratedClassC, when we write code we must write something like: MessageStore c = //something here; and we just use c3 to do our jobs, which is exactly the same way as the current implementations except that rocketmq plugins have to use reflection to load class. And if only one plugin can be supported, the decorator has to be done by the developers, which is not friendly enough in my opinion |
@Jaskey For this, write your decorated code (what you write above) in, say, |
@shroman , indeed it works.But this can be.done by rocketmq actually to make it easier to make up.everything. Say user may have to plugin two store pligins , one for mysql, one for kafka . And after days, the kafka plugin is no longer needed for a period of time, they just modify the property file to remove that plugin and the jobs will be done by rocketmq. If only one plugin is supported the need to modify the source code to provide a.new plugin don't they? |
I would rather get suggestions about this modification, if any, instead of hypothetical considerations. What is described here cannot be done with the current RocketMQ code base -- it's not just config changes, you will need to restart the broker cluster. In addition, from the code I cannot see that more than one store at a time can be supported. Can anyone confirm? |
From the existing implementations, the author are apparently try to support more than one plugin easily. Maybe we can discuss about this with a separate issue in the mail list, for now we just focus on the bug here. |
Initializing a bunch of store implementations and returning only one store makes no sense too. |
@shroman I will close the pr, if you happened to the same question, please let me know. |
[ISSUE #73] Separating all aggregated imports
… a storage plugin.
JIRA issue: https://issues.apache.org/jira/browse/ROCKETMQ-135