Allenhuangrui opened a new issue, #11623:
URL: https://github.com/apache/rocketmq/issues/11623

   ### Is Your Feature Request Related to a Problem?
   
   Proxy integrations may already know application-specific consumer metadata 
when handling a client heartbeat. `HeartbeatSyncerData` currently has no 
generic place to carry this metadata to other proxies, and `HeartbeatSyncer` 
has no callback for applying it to the cached `RemoteChannel` before consumer 
registration or unregistration. Integrations therefore need to duplicate 
heartbeat processing or repeat metadata lookups on receiving proxies.
   
   ### Describe the Solution You'd Like
   
   Add an optional `Map<String, String> extInfo` to `HeartbeatSyncerData`, 
together with optional callbacks configured through `HeartbeatSyncer` and 
`ClusterConsumerManager`:
   
   - A sender callback enriches the heartbeat before serialization for both 
registration and unregistration.
   - A receiver callback processes the decoded heartbeat and the actual cached 
or newly decoded `RemoteChannel` before consumer registration or unregistration.
   - Callback exceptions are logged without blocking the existing heartbeat 
operation.
   
   Keep existing constructors and heartbeat fields unchanged. Unconfigured 
callbacks retain the default behavior, and messages without `extInfo` remain 
supported. The core does not interpret extension keys or replace 
protocol-specific channel data.
   
   ### Describe Alternatives You've Considered
   
   Adding a separate DTO field for each integration's metadata would couple the 
core protocol to those integrations. Reusing the channel's existing protocol 
extension could interfere with protocol-specific data. Copying the heartbeat 
sender and receiver introduces duplicated lifecycle and channel-cache handling.
   
   ### Additional Context
   
   The proposed change is limited to the proxy heartbeat DTO and callback 
wiring. Tests cover extension serialization, messages without extensions, 
cached-channel reuse, callback ordering, callback failure isolation, and 
registration/unregistration.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to