Open tongtaodragon opened 1 year ago
I think it makes sense. Does anyone want to fix this issue?
Please assign this to me, will put forward a pr later !
@RongtongJin I am looking at the code now. At first glance it looks like to we need to change the 'enableMsgTrace' property from boolean to string to assign the spring expression so that the code can evaluate the expression "${demo.consumer.enableMsgTrace}" to get the boolean value using the 'PropertyResolver.resolvePlaceholders'.
this is a contract change at RocketMQMessageListener and ExtRocketMQTemplateConfiguration by changing the enableMsgTrace property datatype from boolean to string.
Can I go forward to change the property datatype? Trying to understand the impact of changing the datatype
@ExtRocketMQTemplateConfiguration( nameServer = "${demo.rocketmq.extNameServer}", tlsEnable = "${demo.rocketmq.ext.useTLS}", enableMsgTrace = "${demo.consumer.enableMsgTrace}" // hope configure like this ) public class ExtRocketMQTemplate extends RocketMQTemplate { }
Provide any additional detail on your proposed use case for this feature. enableMsg is important to identify the message source and consumer. But it may bring performance issue. We don't want to turn off the feature totally through server side configuration. We want to control it from producer client or consumer client when we met performance issue indeed.
Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have). Are you currently using any workarounds to address this issue? should-have. No workaround, we have to hard code true or false in RocketMQMessageListener and ExtRocketMQTemplateConfiguration annotation.