Skip to content

Commit

Permalink
add hook to execute after consume for pop
Browse files Browse the repository at this point in the history
  • Loading branch information
cserwen authored and dengzhiwen1 committed Jan 25, 2022
1 parent 5254805 commit 8891aaf
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,12 @@ public void run() {
consumeMessageContext.getProps().put(MixAll.CONSUME_CONTEXT_TYPE, returnType.name());
}

if (ConsumeMessagePopConcurrentlyService.this.defaultMQPushConsumerImpl.hasHook()) {
consumeMessageContext.setStatus(status.toString());
consumeMessageContext.setSuccess(ConsumeConcurrentlyStatus.CONSUME_SUCCESS == status);
ConsumeMessagePopConcurrentlyService.this.defaultMQPushConsumerImpl.executeHookAfter(consumeMessageContext);
}

ConsumeMessagePopConcurrentlyService.this.getConsumerStatsManager()
.incConsumeRT(ConsumeMessagePopConcurrentlyService.this.consumerGroup, messageQueue.getTopic(), consumeRT);

Expand Down

0 comments on commit 8891aaf

Please sign in to comment.