You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java.lang.NullPointerException: null
at qunar.tc.qmq.protocol.consumer.MetaInfoRequest.setRequestType(MetaInfoRequest.java:96)
at qunar.tc.qmq.metainfoclient.MetaInfoService.request(MetaInfoService.java:128)
at qunar.tc.qmq.metainfoclient.MetaInfoService.requestWrapper(MetaInfoService.java:114)
at qunar.tc.qmq.broker.impl.BrokerServiceImpl.request(BrokerServiceImpl.java:180)
at qunar.tc.qmq.broker.impl.BrokerServiceImpl.getClusterBySubject(BrokerServiceImpl.java:145)
at qunar.tc.qmq.consumer.pull.PlainPullEntry.pull(PlainPullEntry.java:45)
at qunar.tc.qmq.consumer.pull.DefaultPullConsumer.doPull(DefaultPullConsumer.java:126)
at qunar.tc.qmq.consumer.pull.DefaultPullConsumer.run(DefaultPullConsumer.java:114)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at qunar.tc.qmq.concurrent.NamedThreadFactory$1.run(NamedThreadFactory.java:52)
at java.lang.Thread.run(Thread.java:748)
问题描述
在手动pull模式下,MetaInfoService 中的 request方法中的setRequestType方法空指针异常。原因由于第一次获取ClusterFuture时MetaInfoRequestParam对象中的reqestType为null,未被设置值。
版本关系
查阅过1.1.20和1.1.28的源码,不会导致此问题
环境配置
pom文件(部分,环境就是qmq的master分支启动的服务)
代码
出错代码
package qunar.tc.qmq.metainfoclient;
class:MetaInfoService
复现步骤
实际输出结果
简单解决方案
将
request.setRequestType(param.getRequestType());
一行注释掉The text was updated successfully, but these errors were encountered: