提交 85467dfd 编写于 作者: Q qinliujie 提交者: yukon

Fix-35 [ROCKETMQ-35] Reslove underlying NPE in ConsumeRequest, closes apache/incubator-rocketmq#32

上级 9d76ea92
...@@ -439,7 +439,11 @@ public class ConsumeMessageConcurrentlyService implements ConsumeMessageService ...@@ -439,7 +439,11 @@ public class ConsumeMessageConcurrentlyService implements ConsumeMessageService
} else if (ConsumeConcurrentlyStatus.CONSUME_SUCCESS == status) { } else if (ConsumeConcurrentlyStatus.CONSUME_SUCCESS == status) {
returnType = ConsumeReturnType.SUCCESS; returnType = ConsumeReturnType.SUCCESS;
} }
consumeMessageContext.getProps().put(MixAll.CONSUME_CONTEXT_TYPE, returnType.name());
if (ConsumeMessageConcurrentlyService.this.defaultMQPushConsumerImpl.hasHook()) {
consumeMessageContext.getProps().put(MixAll.CONSUME_CONTEXT_TYPE, returnType.name());
}
if (null == status) { if (null == status) {
log.warn("consumeMessage return null, Group: {} Msgs: {} MQ: {}", log.warn("consumeMessage return null, Group: {} Msgs: {} MQ: {}",
ConsumeMessageConcurrentlyService.this.consumerGroup, ConsumeMessageConcurrentlyService.this.consumerGroup,
......
...@@ -501,7 +501,11 @@ public class ConsumeMessageOrderlyService implements ConsumeMessageService { ...@@ -501,7 +501,11 @@ public class ConsumeMessageOrderlyService implements ConsumeMessageService {
} else if (ConsumeOrderlyStatus.SUCCESS == status) { } else if (ConsumeOrderlyStatus.SUCCESS == status) {
returnType = ConsumeReturnType.SUCCESS; returnType = ConsumeReturnType.SUCCESS;
} }
consumeMessageContext.getProps().put(MixAll.CONSUME_CONTEXT_TYPE, returnType.name());
if (ConsumeMessageOrderlyService.this.defaultMQPushConsumerImpl.hasHook()) {
consumeMessageContext.getProps().put(MixAll.CONSUME_CONTEXT_TYPE, returnType.name());
}
if (null == status) { if (null == status) {
status = ConsumeOrderlyStatus.SUSPEND_CURRENT_QUEUE_A_MOMENT; status = ConsumeOrderlyStatus.SUSPEND_CURRENT_QUEUE_A_MOMENT;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册