You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "ivendear (via GitHub)" <gi...@apache.org> on 2025/02/21 03:03:54 UTC

[I] 如何动态设置@RocketMQMessageListener注解中consumeThreadNumber的值 [rocketmq-spring]

ivendear opened a new issue, #707:
URL: https://github.com/apache/rocketmq-spring/issues/707

   ![Image](https://github.com/user-attachments/assets/1c5ae935-eed6-499c-bd92-b35b512cbfd7)
   我使用了Nacos作为配置中心,希望动态调整@RocketMQMessageListener注解中consumeThreadNumber的值,但是因其是int型,没有办法像topic等属性一样使用"${xxx}"的方式引入,我应该如何实现我的目的?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] 如何动态设置@RocketMQMessageListener注解中consumeThreadNumber的值 [rocketmq-spring]

Posted by "francisoliverlee (via GitHub)" <gi...@apache.org>.
francisoliverlee commented on issue #707:
URL: https://github.com/apache/rocketmq-spring/issues/707#issuecomment-2673309195

   好像不行, 这个注解中的值在启动的时候被用了, 设置到consumer实例中了。
   https://github.com/apache/rocketmq-spring/blob/master/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/support/DefaultRocketMQListenerContainer.java#L660C1-L661C1
   
   如果需要改, 在nacos配置变化时, 可能需要重启客户端重新获取最新值
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] 如何动态设置@RocketMQMessageListener注解中consumeThreadNumber的值 [rocketmq-spring]

Posted by "ivendear (via GitHub)" <gi...@apache.org>.
ivendear commented on issue #707:
URL: https://github.com/apache/rocketmq-spring/issues/707#issuecomment-2673449161

   > 好像不行, 这个注解中的值在启动的时候被用了, 设置到consumer实例中了。 https://github.com/apache/rocketmq-spring/blob/master/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/support/DefaultRocketMQListenerContainer.java#L660C1-L661C1
   > 
   > 如果需要改, 在nacos配置变化时, 可能需要重启客户端重新获取最新值
   
   感谢回答。那再退一步,我想在不同的环境中初始化不同的consumeThreadNumber参数值,该如何做呢


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] 如何动态设置@RocketMQMessageListener注解中consumeThreadNumber的值 [rocketmq-spring]

Posted by "francisoliverlee (via GitHub)" <gi...@apache.org>.
francisoliverlee commented on issue #707:
URL: https://github.com/apache/rocketmq-spring/issues/707#issuecomment-2677282152

   nacos用namespace来区分不同的环境,不同环境的consumeThreadNumber配置值不同。
   更多的nacos控制台内容可以看[这里](https://nacos.io/docs/latest/manual/admin/console/?spm=5238cd80.7a4232a8.0.0.f834e755xClbi0)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] 如何动态设置@RocketMQMessageListener注解中consumeThreadNumber的值 [rocketmq-spring]

Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin closed issue #707: 如何动态设置@RocketMQMessageListener注解中consumeThreadNumber的值
URL: https://github.com/apache/rocketmq-spring/issues/707


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org