[
https://issues.apache.org/jira/browse/ROCKETMQ-135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15904769#comment-15904769
]
ASF GitHub Bot commented on ROCKETMQ-135:
-----------------------------------------
Github user Jaskey commented on the issue:
https://github.com/apache/incubator-rocketmq/pull/73
@shroman
Sorry, I still cannot see the problem. No initialization are called inside
the build method and only the outer class are returned.
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;
DecoratedClassA c1 = new DecoratedClassA (c );
DecoratedClassB c2 = new DecoratedClassB (c1 );
DecoratedClassC c3 = new DecoratedClassB (c2 );
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 is supported, the decorator has to be done by the
developers, which is not friendly enough in my opinion
> Broker cannot be properly finalized on failure to load a storage plugin
> -----------------------------------------------------------------------
>
> Key: ROCKETMQ-135
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-135
> Project: Apache RocketMQ
> Issue Type: Bug
> Components: rocketmq-broker
> Affects Versions: 4.0.0-incubating
> Reporter: Roman Shtykh
> Assignee: Roman Shtykh
>
> When a storage plugin fails (
> {{org.apache.rocketmq.broker.plugin.MessageStoreFactory#build}} ), it
> terminates the broker without proper finalization.
> This is because {{RuntimeException}} is thrown by the above-mentioned method
> and it is never properly handled.
> I propose creating a {{BrokerException}}, throw it and properly handle.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)