rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

[Enhancement] Unnecessary broker back notification (notifyConsumerIdsChanged) in broadcast mode

Open yx9o opened this issue 1 year ago • 0 comments

Before Creating the Enhancement Request

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

Summary

Hi, community, recently I found an unnecessary broker reverse notification (notifyConsumerIdsChanged) in broadcast mode.

Background: In one of our online incident investigations, there were thousands of single group broadcast clients, and it was found that the broker had been sending notifyConsumerIdsChanged requests to the broadcast clients.

image

企业微信截图_8e88e985-7986-494f-8971-8a4aafacbd2f

企业微信截图_b5c15368-849d-4cd1-bf6d-7bbdc80bbd29

企业微信截图_b0d6dd68-a323-4025-9b26-3acc99074024

Motivation

Analysis: In broadcast mode, each Consumer consumes complete data, and its rebalance operation only updates the messagequeue information, which is also updated by a scheduled task and has nothing to do with the change in the number of Consumers. So I think that in broadcast mode, if there is any change in Consumer, there is no need to send notifyConsumerIdsChanged requests to all broadcast clients.

Describe the Solution You'd Like

Modification: When sending ConsumerGroupEvent.CHANGE events in ConsumerManager, it is sent only when it is determined to be in non-broadcast mode.

Describe Alternatives You've Considered

No

Additional Context

No response

yx9o avatar Aug 03 '24 02:08 yx9o