rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

[Enhancement] Ignore extra put when checkImmunityTime exceeds the maximum check time range

Open WJ66880 opened this issue 9 months ago • 1 comments

Before Creating the Enhancement Request

  • [x] I have confirmed that this should be classified as an enhancement rather than a bug/feature.

Summary

For a half message, if its CHECK_IMMUNITY_TIME_IN_SECONDS property is lager than checkMax * checkInterval, then it will never be checked, but still has been put for checkMax times. It's a waste of put. If we have a lot of trans messages, the put metrics will by nearly 15 times high.

Motivation

Transactional message's property checkImmunityTime has no upper limit, everyone can set a large value, for example 1800 seconds.

Describe the Solution You'd Like

Continue loop and log warn when CHECK_IMMUNITY_TIME_IN_SECONDS property is lager than checkMax * checkInterval.

Describe Alternatives You've Considered

Do not use checkImmunityTime property, but that's not why it is built for.

Additional Context

No response

WJ66880 avatar Apr 10 '25 07:04 WJ66880