Jaskey Lam created ROCKETMQ-109:
-----------------------------------

             Summary: View BrokerStats may result in ClassCastException when 
using store plugin
                 Key: ROCKETMQ-109
                 URL: https://issues.apache.org/jira/browse/ROCKETMQ-109
             Project: Apache RocketMQ
          Issue Type: Bug
          Components: rocketmq-broker
            Reporter: Jaskey Lam
            Assignee: yukon


private RemotingCommand ViewBrokerStatsData(ChannelHandlerContext ctx, 
RemotingCommand request) throws RemotingCommandException {
        ..//others
        DefaultMessageStore messageStore = (DefaultMessageStore) 
this.brokerController.getMessageStore();//will result in ClassCastException 
when using plugin because plugin is not type of "DefaultMessageStore "
       ..//others



I suggest adding a interface "getStatsItem" to MessageStore to avoid type cast.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to