diff --git a/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/support/DefaultRocketMQListenerContainer.java b/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/support/DefaultRocketMQListenerContainer.java index e632fbc2..c3bf81b2 100644 --- a/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/support/DefaultRocketMQListenerContainer.java +++ b/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/support/DefaultRocketMQListenerContainer.java @@ -429,7 +429,8 @@ public ConsumeConcurrentlyStatus consumeMessage(List msgs, ConsumeCo log.debug("received msg: {}", messageExt); try { long now = System.currentTimeMillis(); - handleMessage(messageExt); + DefaultRocketMQListenerContainer container = applicationContext.getBean(name, DefaultRocketMQListenerContainer.class); + container.handleMessage(messageExt); long costTime = System.currentTimeMillis() - now; log.debug("consume {} cost: {} ms", messageExt.getMsgId(), costTime); } catch (Exception e) { @@ -452,7 +453,8 @@ public ConsumeOrderlyStatus consumeMessage(List msgs, ConsumeOrderly log.debug("received msg: {}", messageExt); try { long now = System.currentTimeMillis(); - handleMessage(messageExt); + DefaultRocketMQListenerContainer container = applicationContext.getBean(name, DefaultRocketMQListenerContainer.class); + container.handleMessage(messageExt); long costTime = System.currentTimeMillis() - now; log.debug("consume {} cost: {} ms", messageExt.getMsgId(), costTime); } catch (Exception e) {