Before Creating the Bug Report
Runtime platform environment
RocketMQ proxy with gRPC consumers and proxy heartbeat sync enabled.
RocketMQ version
develop branch
Describe the Bug
For gRPC consumers, ClientActivity.registerConsumer() rebuilds the subscription data set from the client Settings on each registration/heartbeat path. FilterAPI.build() creates a new SubscriptionData, whose default subVersion is initialized with System.currentTimeMillis().
When the subscription topic and filter expression are unchanged, the newly built SubscriptionData still has a newer subVersion. ConsumerGroupInfo.updateSubscription() currently logs subscription changed whenever the incoming subVersion is greater than the stored one, so the broker/proxy can repeatedly log subscription changes even though the subscription content is identical.
This is especially visible on the proxy internal heartbeat sync path, where the log thread can be HeartbeatSyncer.
Steps to Reproduce
- Start RocketMQ proxy in cluster mode.
- Register a gRPC consumer with a stable subscription.
- Let the client continue sending heartbeat/settings updates or let proxy heartbeat sync propagate the registration data.
- Observe repeated
subscription changed logs with identical topic/filter content but different subVersion values.
What Did You Expect to See?
The broker/proxy should only log subscription changed when the actual subscription content changes.
What Did You See Instead?
The log is printed repeatedly because only subVersion changes.
Additional Context
The repeated log is mostly noise and internal sync overhead, but it can make operational logs misleading and noisy for stable gRPC consumers.
Before Creating the Bug Report
Runtime platform environment
RocketMQ proxy with gRPC consumers and proxy heartbeat sync enabled.
RocketMQ version
develop branch
Describe the Bug
For gRPC consumers,
ClientActivity.registerConsumer()rebuilds the subscription data set from the clientSettingson each registration/heartbeat path.FilterAPI.build()creates a newSubscriptionData, whose defaultsubVersionis initialized withSystem.currentTimeMillis().When the subscription topic and filter expression are unchanged, the newly built
SubscriptionDatastill has a newersubVersion.ConsumerGroupInfo.updateSubscription()currently logssubscription changedwhenever the incomingsubVersionis greater than the stored one, so the broker/proxy can repeatedly log subscription changes even though the subscription content is identical.This is especially visible on the proxy internal heartbeat sync path, where the log thread can be
HeartbeatSyncer.Steps to Reproduce
subscription changedlogs with identical topic/filter content but differentsubVersionvalues.What Did You Expect to See?
The broker/proxy should only log
subscription changedwhen the actual subscription content changes.What Did You See Instead?
The log is printed repeatedly because only
subVersionchanges.Additional Context
The repeated log is mostly noise and internal sync overhead, but it can make operational logs misleading and noisy for stable gRPC consumers.